Application Development and Automation 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: 
Read only

Function module for the Inbound Delivery

Former Member
0 Likes
1,292

Dear ABAPers,

I have created the Inbound Delivery in VL01N Transaction.I want to create the Post goods issue for the Delivery number.What is the Function module for the Post goods issue for the Delivery number and what all the Parameter needs to be passed.

Thanks & Regards,

Ashok.

1 ACCEPTED SOLUTION
Read only

former_member480923
Active Contributor
0 Likes
853

Use the Function Module MB_CREATE_GOODS_MOVEMENT. Pass the Delivery number as the reference document (XBLNR) in MKPF and pass table I_MSEG (called_by = VL02N and BWART = 601).

Hope That Helps

Anirban M.

4 REPLIES 4
Read only

former_member480923
Active Contributor
0 Likes
854

Use the Function Module MB_CREATE_GOODS_MOVEMENT. Pass the Delivery number as the reference document (XBLNR) in MKPF and pass table I_MSEG (called_by = VL02N and BWART = 601).

Hope That Helps

Anirban M.

Read only

Former Member
0 Likes
853

Hi

Use FM MB_POST_GOODS_MOVEMENT for PGI .

I am sure it will be useful .

Give xblnr as input .

Regards,

Ramya

Read only

Former Member
0 Likes
853

Hi,

Try this code...

PARAMETERS: p_vbeln LIKE likp-vbeln OBLIGATORY.

DATA: l_vbkok_wa TYPE vbkok,

l_i_prott TYPE STANDARD TABLE OF prott,

l_pgi_status TYPE xfeld,

c_check TYPE c VALUE 'X'.

l_vbkok_wa-vbeln_vl = p_vbeln.

l_vbkok_wa-vbtyp_vl = 'T'.

l_vbkok_wa-wabuc = c_check.

  • Do PGI

CALL FUNCTION 'WS_DELIVERY_UPDATE'

EXPORTING

vbkok_wa = l_vbkok_wa

commit = c_check

delivery = l_vbkok_wa-vbeln_vl

IMPORTING

ef_error_in_goods_issue_0 = l_pgi_status

TABLES

prot = l_i_prott.

IF l_pgi_status IS NOT INITIAL.

  • WRITE:/ 'PGI Failure : ', p_vbeln.

ELSE.

  • WRITE:/ 'PGI Success : ', p_vbeln.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = c_check.

ENDIF.

Regards

Meenakshi

Read only

0 Likes
853

Dear All,

Thanks for all your reply.Your Answers solved my problem.

Thanks & Regards,

Ashok.