adesso orange🍊Stellenangebote:
Software Engineer Trainee · Senior
| (Senior) Cloud Software Engineer BTP
(Senior) Consultant Technologie
Werkstudent Softwareentwicklung · Fiori / UI5 · Consulting
R PURCHASINGSOURCELISTTP: Unterschied zwischen den Versionen
Aus SAP Wiki ツ
Keine Bearbeitungszusammenfassung |
|||
Zeile 22: | Zeile 22: | ||
=== Orderbuch ändern === | === Orderbuch ändern === | ||
lt_update = CORRESPONDING #( lt_sourcelist ). | lt_update = CORRESPONDING #( lt_sourcelist ). | ||
ASSIGN lt_update[ 1 ] TO FIELD-SYMBOL(<ls_adapt>). | |||
<ls_adapt>-%data-SupplierIsFixed = 'X'. | |||
<ls_adapt>-%control-SupplierIsFixed = if_abap_behv=>mk-on. | |||
MODIFY ENTITIES OF r_purchasingsourcelisttp | |||
ENTITY purchasingsourceitem | |||
UPDATE FROM lt_update | |||
FAILED ls_failed | |||
MAPPED DATA(ls_mapped) | |||
REPORTED ls_reported. | |||
IF ls_failed-purchasingsourceitem IS INITIAL. | |||
COMMIT ENTITIES. | |||
IF sy-subrc = 0. | |||
out->write( 'Updated' ). | |||
ELSE. | |||
out->write( 'Failed Commmit' ). | |||
ENDIF. | |||
ELSE. | |||
out->write( 'Failed Modify' ). | |||
ENDIF. | |||
=== Orderbuch löschen === | === Orderbuch löschen === | ||
=== All in One === |
Version vom 7. Dezember 2024, 11:57 Uhr
Orderbuch erstellen
Orderbuch lesen
DATA lt_selection TYPE TABLE FOR READ IMPORT r_purchasingsourcelistitemtp.
lt_selection = VALUE #( ( sourcelistrecord = 00001
material = '000000000000000001'
plant = '1990' ) ).
READ ENTITIES OF r_purchasingsourcelisttp
ENTITY purchasingsourceitem
ALL FIELDS WITH lt_selection
RESULT DATA(lt_sourcelist)
FAILED DATA(ls_failed)
REPORTED DATA(ls_reported).
Orderbuch ändern
lt_update = CORRESPONDING #( lt_sourcelist ). ASSIGN lt_update[ 1 ] TO FIELD-SYMBOL(<ls_adapt>). <ls_adapt>-%data-SupplierIsFixed = 'X'. <ls_adapt>-%control-SupplierIsFixed = if_abap_behv=>mk-on.
MODIFY ENTITIES OF r_purchasingsourcelisttp ENTITY purchasingsourceitem UPDATE FROM lt_update FAILED ls_failed MAPPED DATA(ls_mapped) REPORTED ls_reported.
IF ls_failed-purchasingsourceitem IS INITIAL. COMMIT ENTITIES. IF sy-subrc = 0. out->write( 'Updated' ). ELSE. out->write( 'Failed Commmit' ). ENDIF. ELSE. out->write( 'Failed Modify' ). ENDIF.