2008 May 21 6:58 AM
Hello Friends,
I have a BDC of VL02 which updates handling units upto 15 line items.This is related to packing.
This transaction works fine in foreground.
In background I do not get the error message but the sequence
is mismatched and due to which the total weight becomes different after 9th line items.
When I debug the background job it works fine as it works in normal foreground.
To me it looks SAP behaves diffrently internally in background.
Not sure what can be done in this case.
Regards
Prashant
2008 May 21 7:29 AM
Prashant,
Generally while recording table control entries as part of BDC, you should not assume that so many number of lines will be visible always. If there is a button or menu function available in VL02 to add a new line to the table control, that should be the option you should use for recording and loop through the same recording as many number of lines in the input file. If you dont have such function / button, you can record in following sequence: (1) Hit page down (2) Enter the new entry in the second line of table control (3) Press Enter. You have to loop through the above recording, i.e. fill up screens for as many number of lines as in the file.
Hope this helps you.
Regards
Suresh Radhakrishnan
2008 May 21 7:22 AM
Prashant,
BDC for table control is totally depending upon the screen resolution.
if you try it on background it will show different behavior than foreground. It will also behave differently for different PC .
So my suggestion is go for BAPI.
Regards,
Swarup
2008 May 21 7:28 AM
Hi,
Many SAP transactions behave differently in online mode and in Batch mode and this mode is determined by the SY-BINPT variable that can be controlled using the OPTIONS command in addition to the CALL TRANSACTION.
For example, the error message that usually comes in status bar while you are running the transaction online might appear in a popup window when you are running that in batch. This will make your fields disabled for input. This OPTIONS addition will remove this problem
The way to use the OPTIONS addition.
Declare a work area of type CTU_PARAMS.
Fill the fields of CTU_PARAMS. The field NOBINPT should be set to X.
This will set the SY-BINPT to space. So now the transaction which you will be calling will run in online mode.
Example.
clear X_OPTIONS.
X_OPTIONS-DISMODE = 'E'.
X_OPTIONS-UPDMODE = 'S'.
X_OPTIONS-CATTMODE = ' '.
X_OPTIONS-DEFSIZE = ' '.
X_OPTIONS-RACOMMIT = ' '.
X_OPTIONS-NOBINPT = 'X'.
X_OPTIONS-NOBIEND = ' '.
call transaction 'BP' using T_BDCDATA[] options from X_OPTIONS.
Note:
Do not use the MODE & UPDATE additions when you are using OPTIONS. The mode & update values are passed in the CTU_PARAMS structure.
Regards
Kiran Sure
2008 May 21 11:21 AM
Hello,
I made the changes using options - BINPT = X in call transaction, but unfortunately this also does not work in background , so I did not get the same results in background which I get in foreground.
Problem remanis as it is.
Thanks.
Regards
Prashant
2008 May 21 7:29 AM
Prashant,
Generally while recording table control entries as part of BDC, you should not assume that so many number of lines will be visible always. If there is a button or menu function available in VL02 to add a new line to the table control, that should be the option you should use for recording and loop through the same recording as many number of lines in the input file. If you dont have such function / button, you can record in following sequence: (1) Hit page down (2) Enter the new entry in the second line of table control (3) Press Enter. You have to loop through the above recording, i.e. fill up screens for as many number of lines as in the file.
Hope this helps you.
Regards
Suresh Radhakrishnan