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: 

call transaction vs. batch input directly in VA01 (SAPLSTXX)

Former Member
0 Kudos

Dear experts,

I create a sales order (VA01) with an z-program using either call transaction or batch input map. In case call transaction returns with sy-subrc NE 0 the bdc-data will

be sent to a batch input map.

If I send the bdc-data to the batch input map directly and start the map everything will be ok.

If I want to make call transaction the program stops when creating the material sales text for an item in program SAPLSTXX. I give the information to use dynpro no. 1100.

But via call transaction the system uses the dynpro no. 2101. That's why the text got lost because RSTXT-TXLINE is not defined at this dynpro.

Some code below:

*Steploop in SAPLSTXX via OSS-note 159738

PERFORM bdc_dynpr USING 'SAPLSTXX' '1100'.

PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(02)' '*'.

PERFORM bdc_field USING 'RSTXT-TXLINE(02)' wa_inp-text.

PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(03)' '*'.

PERFORM bdc_field USING 'RSTXT-TXLINE(03)' wa_inp-text2.

PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(03)'.

PERFORM bdc_field USING 'BDC_OKCODE' 'EDFM'.

I use the parameter OPTIONS from l_opt at call transaction:

l_opt-dismode = 'E'.

l_opt-updmode = 'S'.

l_opt-cattmode = ' '.

l_opt-nobinpt = 'X'.

l_opt-nobiend = 'X'.

Other combinations for the parameters nobinpt and nobiend bring other symptoms and errors which are not desired.

Does anybody can give a hint why call transaction uses another dynpro than batch input?

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Britta,

Maybe you can try bapi BAPI_SALESORDER_CREATEFROMDAT2.

There're a lot of sample codes than you can find in SDN.

Thanks

Luis

3 REPLIES 3

suresh_datti
Active Contributor
0 Kudos

Hi,

Use SY-BINPT = 'X'. in your CALL TRANSACTION code to make the system think you are in Batch mode..

Regards,

Suresh Datti

0 Kudos

Hi Suresh,

thanks, but I don't understand:

1. sy-binpt is not a part of the OPTIONS-structure of call transaction. If I use l_opt-nobinpt = space there will be another error as I mentioned above ("item is not marked" which is not correctly.

2. any field of the syst structure cannot be changed but only read.

Former Member
0 Kudos

Hi Britta,

Maybe you can try bapi BAPI_SALESORDER_CREATEFROMDAT2.

There're a lot of sample codes than you can find in SDN.

Thanks

Luis