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: 

Probelm in BDC : VL01

Former Member
0 Kudos

Hi all,

I am doing BDC for T.Code : VL01( Outbound Delivery).I need to create the doc for a particular selected item like 2nd,4th,5th,7th,, items for the order. So i am deleting other Items in vl01 through my program. After finishing this bdc is not working. It stopped in same screen and doesn't shows any message. I am not understanding why this problem came.

Plz tell me how to solve this issue. If it possible through BAPI send me codes. Also kindly explain me what are the inputs we want to give for this Bapi.

Thankx advance,,,,

T.Duraimurugan.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check 'BAPI_OUTB_DELIVERY_CREATE_SLS' (Generates Delivery for Customer Order) and 'BAPI_OUTB_DELIVERY_CREATE_STO' (Generates Delivery for Stock Transport Order).

I hope this helps...

6 REPLIES 6

Former Member
0 Kudos

Don't use BATCH INPUT. If another programmer wants to change something afterwards, she/he'll be grateful...

Debug the standard transaction and try to find out how the functionality is implemented (Set breakpoint at statement 'CALL FUNCTION' at the beginning).

I know that this is harder as batch input, but it's a much better way of programming.

Former Member
0 Kudos

Hi,

Check this BAPI:

BAPI_OUTB_DELIVERY_CREATE_SLS

Check the documentation in SE37, its very clear on the params.

Rgds,

Raghu.

Former Member
0 Kudos

Check 'BAPI_OUTB_DELIVERY_CREATE_SLS' (Generates Delivery for Customer Order) and 'BAPI_OUTB_DELIVERY_CREATE_STO' (Generates Delivery for Stock Transport Order).

I hope this helps...

Former Member
0 Kudos

These are the inputs for the bapi:

function bapi_outb_delivery_create_sls.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(SHIP_POINT) TYPE  BAPIDLVCREATEHEADER-SHIP_POINT OPTIONAL
*"     VALUE(DUE_DATE) TYPE  BAPIDLVCREATEHEADER-DUE_DATE OPTIONAL
*"     VALUE(DEBUG_FLG) TYPE  BAPIDLVCONTROL-DEBUG_FLG OPTIONAL
*"  EXPORTING
*"     VALUE(DELIVERY) TYPE  BAPISHPDELIVNUMB-DELIV_NUMB
*"     VALUE(NUM_DELIVERIES) TYPE  BAPIDLVCREATEHEADER-NUM_DELIVERIES
*"  TABLES
*"      SALES_ORDER_ITEMS STRUCTURE  BAPIDLVREFTOSALESORDER
*"      SERIAL_NUMBERS STRUCTURE  BAPIDLVSERIALNUMBER OPTIONAL
*"      EXTENSION_IN STRUCTURE  BAPIPAREX OPTIONAL
*"      DELIVERIES STRUCTURE  BAPISHPDELIVNUMB OPTIONAL
*"      CREATED_ITEMS STRUCTURE  BAPIDLVITEMCREATED OPTIONAL
*"      EXTENSION_OUT STRUCTURE  BAPIPAREX OPTIONAL
*"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
*"----------------------------------------------------------------------

Optionally you can give a ship point (type VSTEL) and a due date (e.g. 20080624).

It is mandatory that you fill the table SALES_ORDER_ITEMS.

You can check documentation vai SE37 (give BAPI name and then click 'display') and on the next screen you can click on 'Function Module Documentation'.

Please be aware that for some BAPIs you have to perform FM 'BAPI_TRANSACTION_COMMIT' after performing the BAPI to write back data.

Former Member
0 Kudos

Hi,

Use the below logic to delete the line items which are not required for the delivery document and which are present in the sales order:-

  • PERFORM SCREEN USING 'SAPMV50A' '0220'.

PERFORM scrfld USING: 'BDC_OKCODE' '=POPO'.

PERFORM screen USING 'SAPMV50A' '0111'.

PERFORM scrfld USING: 'RV50A-POSNR' it_sorder-posnr,

'BDC_OKCODE' '=WEIT'.

CLEAR l_itemidx.

PERFORM screen USING 'SAPMV50A' '0220'.

PERFORM scrfld USING: 'RV50A-LIPS_SELKZ(01)' 'X',

'BDC_OKCODE' '=POLO'.

We have used the above logic and it worked fine for us.

Thanks,

Mahesh.

Former Member
0 Kudos

Hi Mahesh,

Here this part of code is not working, so can u send me the full bdc code to uploading data's for this transactions -

vl01.

Thankx advance,

T.Durai murugan.