2007 Jul 10 7:01 PM
Hi all,
iam having an issue with bdc for mmsc t-code
This is the code iam having
form populating_i_bdctab.
clear : wa_itab.
data: a_line(20) type c.
data : begin of i_mard occurs 0.
include structure mard.
data: end of i_mard.
data: l_string type string.
loop at itab into wa_itab.
select * from mard into table i_mard where matnr = wa_itab-matnr and
werks = wa_itab-werks.
describe table i_mard lines a_line.
a_line = a_line + 1.
condense a_line.
perform bdc_dynpro using 'SAPMM03M' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RM03M-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RM03M-MATNR'
wa_itab-matnr.
perform bdc_field using 'RM03M-WERKS'
wa_itab-werks.
perform bdc_field using 'RM03M-LFLAG'
'X'.
perform bdc_dynpro using 'SAPMM03M' '0195'.
clear l_string.
concatenate 'RM03M-LMINB(' a_line ')' into l_string.
perform bdc_field using 'BDC_CURSOR'
'RM03M-LMINB(05)'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
clear l_string.
concatenate 'RM03M-LGORT(' a_line ')' into l_string.
perform bdc_field using l_string
wa_itab-lgortt.
clear l_string.
concatenate 'RM03M-RLGOR(' a_line ')' into l_string.
perform bdc_field using l_string
wa_itab-lgortf.
CLEAR L_STRING.
CONCATENATE 'RM03M-LPGBE(' A_LINE ')' INTO L_STRING.
*perform bdc_field using L_STRING
wa_itab-lpgbe. ------ This thing doesn't work L_STRING = RM03M-LPGBE(7)
ERROR -Field RM03M-LPGBE(7) does not exist in the screen SAPMM03M 0195
perform bdc_field using 'RM03M-LGPBE(07)' -
This thing works
wa_itab-lpgbe.
clear l_string.
concatenate 'RM03M-DISKZ(' a_line ')' into l_string.
perform bdc_field using l_string
wa_itab-diskz.
clear l_string.
concatenate 'RM03M-LMINB(' a_line ')' into l_string.
perform bdc_field using l_string
wa_itab-lminb.
perform bdc_insert.
clear : wa_itab.
endloop.
wHEN I USE THE L_STRING I DON'T SEE THE VALUE ON THE SCREEN.
i AM BIT CONFUSED AS TO WHY IT DOESN'T WORK WHEN ALL OTHER FIELDS ARE BEING POPULATED
lET ME KNOW
2007 Jul 10 7:07 PM
2007 Jul 10 7:07 PM
2007 Jul 10 7:13 PM
Hi Rich ,
i tried doing this as well
data : a type c.
a = 0.
concatenate a A_LINE into a_line.
CLEAR L_STRING.
CONCATENATE 'RM03M-LPGBE(' A_LINE ')' INTO L_STRING.
perform bdc_field using L_STRING
wa_itab-lpgbe.
l_string = RM03M-LPGBE(07)
Even then i have the same error
Thanks
let me know
2007 Jul 10 7:25 PM
2007 Jul 10 7:37 PM
Hi Rich,
My bad
Thanks you're right.
Thanks for everyone of you
Anyhow that was a great catch
Thanks again
2007 Jul 10 7:10 PM
Hi,
Use SHDB to record the transaction and check how the values are populated in the screen fields..
Thanks
Naren
2007 Jul 10 7:13 PM
HI David,
Ensure that your index specification is in the form of '01' 02' '03'.
The other reason could be. you are trying to populate the 7th line of the table control.. and during run time .. the program might only find 6 lines... use page down logic for the table control.. after every 6 lines..
Thanks
Mahesh
2007 Jul 10 7:16 PM
Hi all,
The page down is not an issue because i see all other values being populated which belong to to the same row
SHDB recording shows the value of the row even for this field as (07) or (08) depends on the row
I can send the entire code if you want
Thanks
2007 Jul 10 7:25 PM
Try something like :
data g_ctr(2) type n.
g_ctr = 0.
LOOP AT t_tcdata.
g_ctr = g_ctr + 01.
CONCATENATE c_matnr '( ' g_ctr ' ) ' INTO g_mabnr.
PERFORM f_bdc_field USING g_mabnr g_matnr. "t_tcdata-matnr..
CONCATENATE c_kdmat '( ' g_ctr ' ) ' INTO g_kdmat.
PERFORM f_bdc_field USING g_kdmat t_tcdata-kdmat.
CONCATENATE c_kwmeng '( ' g_ctr ' ) ' INTO g_kwmeng.
PERFORM f_bdc_field USING g_kwmeng t_tcdata-kwmeng.
endloop.
Thanks
Seshu
2007 Jul 10 7:25 PM
2007 Jul 10 7:26 PM