02-18-2006 1:31 PM
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
02-20-2006 2:51 AM
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
02-18-2006 1:38 PM
Hi,
Use SY-BINPT = 'X'. in your CALL TRANSACTION code to make the system think you are in Batch mode..
Regards,
Suresh Datti
02-18-2006 2:17 PM
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.
02-20-2006 2:51 AM
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