‎2008 Oct 17 2:07 PM
Hi,
I'm using a CALL TRANSACTION USING bdcdata. and i cannot get pass the OKCODE = '/00'. I always have to hit enter in the target selection. I cannot use AND SKIP FIRST SCREEN cause i have to pass a value.
Im must enter a contract transaction with a specified contract number.
Many thanks,
Alin.
‎2008 Oct 17 3:04 PM
Hi Alin,
In the code that i have shown will be of exactly of your requirement i mean until we press ENTER next records will be populated save the current records on the screen.
Here is the sample code working fine for me modify according to your issue..
FORM WRITE_RECORDS.
LOOP AT IT_TABDATA INTO WA_ITAB.
perform bdc_dynpro using 'ZORMM' '0900'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'BDC_CURSOR'
'ZORMM-DDTIM'.
perform bdc_field using 'ZORMM-BOKNO'
WA_ITAB-BOKNO.
perform bdc_field using 'ZORMM-PASNO'
WA_ITAB-PASNO.
perform bdc_field using 'ZORMM-TPRNO'
WA_ITAB-TPRNO.
perform bdc_field using 'ZORMM-FMDAT'
WA_ITAB-FMDAT.
perform bdc_field using 'ZORMM-VLDFR'
WA_ITAB-VLDFR.
perform bdc_field using 'ZORMM-VLDTO'
WA_ITAB-VLDTO.
perform bdc_field using 'ZORMM-DTIOP'
WA_ITAB-DTIOP.
perform bdc_field using 'ZORMM-TMIOP'
WA_ITAB-TMIOP.
perform bdc_field using 'ZORMM-NMINE'
WA_ITAB-NMINE.
perform bdc_field using 'ZORMM-NLESS'
WA_ITAB-NLESS.
perform bdc_field using 'ZORMM-NPTRS'
WA_ITAB-NPTRS.
perform bdc_field using 'ZORMM-DESTN'
WA_ITAB-DESTN.
perform bdc_dynpro using 'ZORMM' '0900'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
CALL TRANSACTION 'ZYM11' USING IT_BDCDATA MODE 'A' UPDATE 'S'
MESSAGES INTO IT_BDCMSGCOLL.
REFRESH IT_BDCDATA.
Hope my answer helps you.
Cheers!!
‎2008 Oct 17 2:12 PM
‎2008 Oct 17 2:12 PM
For which tocde you are working
and what is the data u want to pass???????
‎2008 Oct 17 2:52 PM
Hi,
VA43 - and i pass only the contract number. I use the exact same code for BDC table as doing a RECORDING from t-code SHDB.
Thanks.
‎2008 Oct 17 3:00 PM
Hi,
You have to use Set parameter ID for the screen field in TCODE VA43.
SET PARAMETER ID 'AUN' FIELD <fieldval.>
Calling the transaction VA43 Display Contract(Initial screen)
CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.
With Regadrs,
Dwarakanath.S
‎2008 Oct 17 3:04 PM
Hi Alin,
In the code that i have shown will be of exactly of your requirement i mean until we press ENTER next records will be populated save the current records on the screen.
Here is the sample code working fine for me modify according to your issue..
FORM WRITE_RECORDS.
LOOP AT IT_TABDATA INTO WA_ITAB.
perform bdc_dynpro using 'ZORMM' '0900'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'BDC_CURSOR'
'ZORMM-DDTIM'.
perform bdc_field using 'ZORMM-BOKNO'
WA_ITAB-BOKNO.
perform bdc_field using 'ZORMM-PASNO'
WA_ITAB-PASNO.
perform bdc_field using 'ZORMM-TPRNO'
WA_ITAB-TPRNO.
perform bdc_field using 'ZORMM-FMDAT'
WA_ITAB-FMDAT.
perform bdc_field using 'ZORMM-VLDFR'
WA_ITAB-VLDFR.
perform bdc_field using 'ZORMM-VLDTO'
WA_ITAB-VLDTO.
perform bdc_field using 'ZORMM-DTIOP'
WA_ITAB-DTIOP.
perform bdc_field using 'ZORMM-TMIOP'
WA_ITAB-TMIOP.
perform bdc_field using 'ZORMM-NMINE'
WA_ITAB-NMINE.
perform bdc_field using 'ZORMM-NLESS'
WA_ITAB-NLESS.
perform bdc_field using 'ZORMM-NPTRS'
WA_ITAB-NPTRS.
perform bdc_field using 'ZORMM-DESTN'
WA_ITAB-DESTN.
perform bdc_dynpro using 'ZORMM' '0900'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
CALL TRANSACTION 'ZYM11' USING IT_BDCDATA MODE 'A' UPDATE 'S'
MESSAGES INTO IT_BDCMSGCOLL.
REFRESH IT_BDCDATA.
Hope my answer helps you.
Cheers!!
‎2008 Oct 17 4:29 PM
You are using mode 'A' in the code, so i twill ask you to press enter at each screen. change it to mode 'N'
CALL TRANSACTION 'ZYM11' USING IT_BDCDATA MODE 'A' UPDATE 'S'
‎2008 Oct 18 8:14 AM
Hi,
If i use mode 'N' the screens are not displayed. I only want to access VA43 to display contract details.
But this is done in a method that is triggered by a double-click event.
Here's my BDC code:
REFRESH bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPMV45A'.
bdcdata_wa-dynpro = '102'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'VBAK-VBELN'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '/00'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'VBAK-VBELN'.
bdcdata_wa-fval = ls_veda-vbeln.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPMV45A'.
bdcdata_wa-dynpro = '4001'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CALL TRANSACTION 'VA43' USING bdcdata_tab.Thanks,
Alin.
‎2008 Oct 18 8:35 AM
Ok problem solved i did like this if you are intrested.
Same BDC code but two calls one with 'P' and one with 'SKIP':
CALL TRANSACTION 'VA43' USING bdcdata_tab MODE 'P'.
CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.Many thanks,
Alin.
‎2008 Oct 17 3:32 PM
Hi,
Thanks for the answers i tried both ways ... doesnt work .... it seems a good ideea the one with SET PARAMETER ... but it does not set it in t-code VA43 ..... don't know why.
Thanks,
Alin.
‎2008 Oct 17 3:43 PM
Hi Alin,
Can you post your recording..?
I want to go through it once and try to find your mistake.
So that some one may help you.
Cheers!!