Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

update delivery with material and quantity.

Former Member
0 Kudos

hai abap gurus,

My requirement is to create a sales order and create a delivery with sales order reference.

I done both.But now i want to update my delivery with material and quantity.

Is there is any bapi or function module.

can any one help for my request.

with regards,

mallik

2 REPLIES 2

Former Member
0 Kudos

Hi,

BAPI:

BAPI_INB_DELIVERY_CHANGE

BAPI_OUTB_DELIVERY_CHANGE

SHP_BAPI_DELIVERY_CHANGE

FM:

SD_DELIVERY_CUMULATIVE_CHANGE

satsrockford
Active Participant
0 Kudos

Hi,

You're on good way while using FM SERNR_ADD_TO_LS and SERIAL_LISTE_POST_LS .

In the second function module you don't need to pass anything.

Don't forget to make a commit work to avoid database error during synchronisation.

I had also one case of updating the serial to the document. It was the Sales order. I have worked with the function module SERNR_ADD_TO_AU which is internally using the function module SERNR_ADD_TO_DOCUMENT. The following is the sample code for it:

CALL FUNCTION 'SERNR_ADD_TO_AU'

EXPORTING

sernr = w_sernr

profile = c_zd01

material = w_matnr

quantity = '1'

document = w_vbeln

item = '00010'

debitor = fs_header-sap_ship_to

vbtyp = 'C'

sd_auart = w_doc_type

sd_postyp = w_item_cat

IMPORTING

anzsn = w_anzsn

zeilen_id = w_zeile

serial_commit = w_serial_commit

EXCEPTIONS

konfigurations_error = 1

serialnumber_errors = 2

serialnumber_warnings = 3

no_profile_operation = 4

OTHERS = 5.

IF sy-subrc eq 0.

CALL FUNCTION 'SERIAL_LISTE_POST_AU'.

COMMIT WORK.

ENDIF.

And one more thing, don't forget to have the call to the function module 'SERIAL_LISTE_POST_AU' amd commit work if the return code is 0. This is also mandatory.

regards

Satish