Verifica che la RdA (Richiesta di Acquisto)
sia rilasciata
Da codice Abap per verificare se la Rda è stata rilasciata (quindi è
arrivata all’ultima fase della strategia di rilascio) usare il FM BAPI_REQUISITION_GETRELINFO:
DATA: lt_gen_release TYPE STANDARD TABLE OF bapirlgnrq,
lt_release_posted TYPE STANDARD TABLE OF bapirlcorq,
lt_release_final TYPE STANDARD TABLE OF bapirlcorq,
lt_relcode_final TYPE STANDARD TABLE OF relcode1,
lt_relcode_posted TYPE STANDARD TABLE OF relcode1,
ls_relcode_final TYPE relcode1,
ls_relcode_posted TYPE relcode1,
lt_rda_rilasciata TYPE c LENGTH 1.
FIELD-SYMBOLS: <lfs_release_posted> TYPE bapirlcorq,
<lfs_release_final> TYPE bapirlcorq.
lt_release_posted TYPE STANDARD TABLE OF bapirlcorq,
lt_release_final TYPE STANDARD TABLE OF bapirlcorq,
lt_relcode_final TYPE STANDARD TABLE OF relcode1,
lt_relcode_posted TYPE STANDARD TABLE OF relcode1,
ls_relcode_final TYPE relcode1,
ls_relcode_posted TYPE relcode1,
lt_rda_rilasciata TYPE c LENGTH 1.
FIELD-SYMBOLS: <lfs_release_posted> TYPE bapirlcorq,
<lfs_release_final> TYPE bapirlcorq.
CLEAR: lt_gen_release, lt_release_posted, lt_release_final.
REFRESH: lt_gen_release, lt_release_posted, lt_release_final.
lt_rda_rilasciata = 'N'. "Rda non rilasciata
* Verificare che la Rda sia rilasciata
CALL FUNCTION 'BAPI_REQUISITION_GETRELINFO'
EXPORTING
number = banfn “Nr. Rda
REFRESH: lt_gen_release, lt_release_posted, lt_release_final.
lt_rda_rilasciata = 'N'. "Rda non rilasciata
* Verificare che la Rda sia rilasciata
CALL FUNCTION 'BAPI_REQUISITION_GETRELINFO'
EXPORTING
number = banfn “Nr. Rda
TABLES
general_release_info = lt_gen_release
release_already_posted = lt_release_posted
release_final = lt_release_final.
IF NOT lt_release_posted IS INITIAL AND
NOT lt_release_final IS INITIAL.
UNASSIGN <lfs_release_posted>.
READ TABLE lt_release_posted ASSIGNING <lfs_release_posted> INDEX 1.
UNASSIGN <lfs_release_final>.
READ TABLE lt_release_final ASSIGNING <lfs_release_final> INDEX 1.
IF <lfs_release_final> IS ASSIGNED AND
<lfs_release_posted> IS ASSIGNED.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code1.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code2.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code3.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code4.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code5.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code6.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code7.
APPEND ls_relcode_final TO lt_relcode_final.
SORT lt_relcode_final.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code1.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code2.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code3.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code4.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code5.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code6.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code7.
APPEND ls_relcode_posted TO lt_relcode_posted.
SORT lt_relcode_posted.
IF lt_relcode_final[] = lt_relcode_posted[].
lt_rda_rilasciata = 'S'. "Rda RILASCIATA
ENDIF.
general_release_info = lt_gen_release
release_already_posted = lt_release_posted
release_final = lt_release_final.
IF NOT lt_release_posted IS INITIAL AND
NOT lt_release_final IS INITIAL.
UNASSIGN <lfs_release_posted>.
READ TABLE lt_release_posted ASSIGNING <lfs_release_posted> INDEX 1.
UNASSIGN <lfs_release_final>.
READ TABLE lt_release_final ASSIGNING <lfs_release_final> INDEX 1.
IF <lfs_release_final> IS ASSIGNED AND
<lfs_release_posted> IS ASSIGNED.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code1.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code2.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code3.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code4.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code5.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code6.
APPEND ls_relcode_final TO lt_relcode_final.
CLEAR: ls_relcode_final.
ls_relcode_final = <lfs_release_posted>-rel_code7.
APPEND ls_relcode_final TO lt_relcode_final.
SORT lt_relcode_final.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code1.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code2.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code3.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code4.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code5.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code6.
APPEND ls_relcode_posted TO lt_relcode_posted.
CLEAR: ls_relcode_posted.
ls_relcode_posted = <lfs_release_final>-rel_code7.
APPEND ls_relcode_posted TO lt_relcode_posted.
SORT lt_relcode_posted.
IF lt_relcode_final[] = lt_relcode_posted[].
lt_rda_rilasciata = 'S'. "Rda RILASCIATA
ENDIF.
ENDIF.
ENDIF.
ENDIF.
EBOOK: le mie guide sono visualizzabili cliccando sui link:
1. SAP EWM (Extended Warehouse Management)
3. SAP VIM (Vendor Invoice Management)
1. SAP EWM (Extended Warehouse Management)
3. SAP VIM (Vendor Invoice Management)
SE MI CONTATTATE IN PRIVATO, PAGATE LA META' DEL PREZZO DI AMAZON, E POTETE SCEGLIERE IL FORMATO WORD o PDF.
>>> RECENSIONI DEI LIBRI su Amazon Kindle <<<
Ebook: SAP CDS: https://www.amazon.it/dp/B0B9BD1RN3#customerReviews
Ebook: SAP MM: https://www.amazon.it/dp/B0C3MKD9BR#customerReviews
Ebook: SAP MII: https://www.amazon.it/dp/B0C4392MY9#customerReviews
Ebook: SAP VIM: https://www.amazon.it/dp/B0C6FBK8QN#customerReviews
Ebook: SAP MM: https://www.amazon.it/dp/B0C3MKD9BR#customerReviews
Ebook: SAP MII: https://www.amazon.it/dp/B0C4392MY9#customerReviews
Ebook: SAP VIM: https://www.amazon.it/dp/B0C6FBK8QN#customerReviews
Ebook: SAP EWM: https://www.amazon.it/dp/B0CL6TXP1V#customerReviews
Nessun commento:
Posta un commento