2019 Dec 02 9:59 PM
All,
I have created a BDC for the transaction code LT04, in that for the field 'Foreground/Background' i have passed 'H' (Foreground) in the recording. Through i am populating 'H'(Foreground) it does take the 'System_Guided' as input while processing. BDC is not taking the populated value. Any suggestion to populate the value.
Thanks in advance.
bdc_dynpro( exporting iv_program = 'SAPML03T'
iv_dynpro = '0131'
changing ct_bdcdata = lt_bdcdata ).
bdc_field( exporting iv_fnam = 'LTAK-LGNUM'
iv_fval = '240'
changing ct_bdcdata = lt_bdcdata ).
clear lv_fval.
lv_fval = lv_tbnum.
bdc_field( exporting iv_fnam = 'LTBK-TBNUM'
iv_fval = lv_fval
changing ct_bdcdata = lt_bdcdata ).
bdc_field( exporting iv_fnam = '*LTBP-TBPOS'
iv_fval = space
changing ct_bdcdata = lt_bdcdata ).
constants: foreground type lvs_dunkl value 'H'.
clear lv_fval.
lv_fval = foreground.
bdc_field( exporting iv_fnam = 'RL03T-DUNKL'
iv_fval = lv_fval "<--Passing 'H'
changing ct_bdcdata = lt_bdcdata ).
2020 Jan 24 3:04 PM
Could not find any particular reason for this issue, ended up writing two separate BDCs and handled the issue.
Thanks all for your suggestions.
2019 Dec 03 6:09 AM
Hello S Nalluri,
Not sure if there is a Mode called 'H', below are the possible modes:
Also the datatype for the variable should be type C.
Regards!
2019 Dec 03 8:36 AM
2019 Dec 03 9:52 AM
2019 Dec 03 6:18 AM
Use transaction SHDB to record the batch input & generates the corresponding program, that will help you to solve a lot of errors
2019 Dec 03 4:06 PM
2019 Dec 03 8:48 AM
Hi,
Are you appending internal table lt_bdcdata with field name 'BDC_CURSOR' , field value 'RL03T-DUNKL' .
Regards
Mukhtar
2019 Dec 03 9:56 AM
Hello S Nalluri,
Probably once you are populating the value to lv_fval there may be some space before the actual value, try debugging and understand if the value H is actually passed to lv_fval. if there is any space before H then as per the domain values space corresponds to System Guided thats the reason you get the issue.
Before passing the value try to condense the variable lv_fval as shown below, this should solve the issue. Let us know for any clarification needed.
CONDENSE lv_fval.
2019 Dec 03 4:05 PM
I tried it already but for some wired reason it is not working @Satish Kumar Balasubramanian
2019 Dec 03 12:17 PM
You should run your batch input in dialog and with CALL TRANSACTION .. MODE 'A' (display all screens) so that to understand what really happens...
2019 Dec 03 4:04 PM
sandra.rossi I checked it in MODE - A, it just didn't populate the value. I am not sure what else i should try i have tried all the suggestions already.
I requested to change the config to default the LT04 mode as 'Foreground' but this option is also ruled out.
2019 Dec 03 4:06 PM
S Nalluri What kind of field is it, a dropdown listbox? Can you post a screenshot?
2019 Dec 03 4:18 PM
sandra.rossi It is a drop down field. Please find the screen shot.lt04-field-dunkl-field-issue.png
2019 Dec 03 4:47 PM
S Nalluri In dropdown listbox, you must enter the code, not the text. You may display the codes in the listbox via the SAP GUI settings > interaction > visualization 1 > checkbox display codes in listbox.
2019 Dec 03 4:50 PM
Oops Veselina Peykova has already explained the possible values:
I don't understand why you have an issue then...
2019 Dec 03 5:01 PM
NO ISSUE.
data(lt_bdcdata) = value bdcdata_tab(
( program = 'SAPML03T' dynpro = '0131' dynbegin = 'X' )
( fnam = 'LTAK-LGNUM' fval = '240' )
( fnam = 'LTBK-TBNUM' fval = '1' )
( fnam = '*LTBP-TBPOS' fval = ' ' )
( fnam = 'RL03T-DUNKL' fval = 'H' ) ).
call transaction 'LT04' using lt_bdcdata mode 'E'.
2020 Jan 24 3:04 PM
Could not find any particular reason for this issue, ended up writing two separate BDCs and handled the issue.
Thanks all for your suggestions.