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 ツ
M1ch3lde (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
M1ch3lde (Diskussion | Beiträge)
Zeile 25: Zeile 25:
<ls_adapt>-%data-SupplierIsFixed = 'X'.
<ls_adapt>-%data-SupplierIsFixed = 'X'.
<ls_adapt>-%control-SupplierIsFixed = if_abap_behv=>mk-on.
<ls_adapt>-%control-SupplierIsFixed = if_abap_behv=>mk-on.
 
  MODIFY ENTITIES OF r_purchasingsourcelisttp  
  MODIFY ENTITIES OF r_purchasingsourcelisttp  
   ENTITY purchasingsourceitem
   ENTITY purchasingsourceitem
Zeile 32: Zeile 32:
     MAPPED DATA(ls_mapped)
     MAPPED DATA(ls_mapped)
     REPORTED ls_reported.
     REPORTED ls_reported.
 
  IF ls_failed-purchasingsourceitem IS INITIAL.
  IF ls_failed-purchasingsourceitem IS INITIAL.
   COMMIT ENTITIES.
   COMMIT ENTITIES.

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.

Orderbuch löschen

All in One