05-27-2007 1:59 PM
Hi.
I am updating the table T508a using call transaction method(BDC).When i take the mode as "A" ie display all..its working but when i use it as "N" ie no diaplay.. its not working......
Also when using "A" mode after saving the data,i have to press the back button,which is not in the recording...so pleaae help me what should i do nw..
waitin very eagerly ..
05-27-2007 11:04 PM
Carefully read what you have posted and you will find your answer.
Your problem: Incomplete recording - Your recoridng is missing the code for the back button.
When you run in A mode, you see the screens and you press the back button to complete the transaction.
When you run in N mode, there is nobody to press the back button.
Solution: Re-record the transaction completely.
05-28-2007 1:39 PM
I have done recording multiple of times.But still its not working in 'N' mode..
I have manualyy done some coding regarding the back button for that screen .. but stillits nt working
05-28-2007 3:23 AM
This is due to incomplete code. In MODE 'A' you say that you are manually pressing BACK button for completion of transaction. Do develop the code for this and then apply and see for MODE 'N'. It will work if it works for 'A'.
Reward points to all useful answers.
Regards,
SaiRam
05-28-2007 4:32 AM
<b>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.</b>
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.
05-28-2007 1:45 PM
Gaurav,
Post the Code...
or actual Transaction recorded...
Best Regards,
Aslam Riaz
05-28-2007 4:31 PM
recording of populating T508a table through sm31 transaction..
PERFORM bdc_dynpro USING 'SAPMSVMA' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=UPD'.
PERFORM bdc_field USING 'VIEWNAME'
'V_T508A'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VIEWNAME'.
PERFORM bdc_field USING 'VIMDYNFLDS-LTD_DTA_NO'
'X'.
**
PERFORM bdc_dynpro USING 'SAPL0PXA' '6011'.
PERFORM bdc_field USING 'BDC_CURSOR'
'V_T508A-ZEITY(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=NEWL'.
**
PERFORM bdc_dynpro USING 'SAPL0PXA' '6012'.
PERFORM bdc_field USING 'BDC_CURSOR'
'V_T508A-JRSTD'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'V_T508A-ZEITY'
zeity.
PERFORM bdc_field USING 'V_T508A-MOFID'
mofid.
PERFORM bdc_field USING 'V_T508A-MOSID'
'1'.
PERFORM bdc_field USING 'V_T508A-SCHKZ'
val_schkz.
PERFORM bdc_field USING 'V_T508A-TGSTD'
tgstd1.
PERFORM bdc_field USING 'V_T508A-M1STD'
m1std1.
PERFORM bdc_field USING 'V_T508A-WOSTD'
wostd1.
PERFORM bdc_field USING 'V_T508A-JRSTD'
jrstd1.
PERFORM bdc_field USING 'V_T508A-WKWDY'
wkwdy1.
PERFORM bdc_field USING 'V_T508A-ZMODN'
zmodn.
PERFORM bdc_field USING 'V_T508A-BZPKT'
'01/01/1990'.
PERFORM bdc_field USING 'V_T508A-OFFBZ'
'001'.
PERFORM bdc_field USING 'V_T508A-MOTTY'
'01'.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLSVIM '.
PERFORM bdc_field USING 'D0001_BEGIN(01)'
'01/01/1990'.
PERFORM bdc_field USING 'D0001_END(01)'
'12/31/9999'.
PERFORM bdc_dynpro USING 'SAPLSTRD' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=LOCK'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KO008-TRKORR'.
PERFORM bdc_field USING 'KO008-TRKORR'
'DEVK936000'.
PERFORM bdc_dynpro USING 'SAPL0PXA' '6011'.
PERFORM bdc_field USING 'BDC_CURSOR'
'V_T508A-ZEITY(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
**
PERFORM bdc_dynpro USING 'SAPMSVMA' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/EBACK'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VIEWNAME'.
05-28-2007 2:02 PM
hi aslam,
to which t-code u have done the recording .If it is an enjoy transaction there may be some problem,why because some enjoy transactions will not work in the Background mode....
so if it is enjoy transaction while u do recording select the option "Simulate Backgroung".so if u have any problem with the transaction then at the time of recording only it gives u the error msg.
thanks,
Ravinder.