Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC Unable to populate the field for transaction code LT04

srikanthnalluri
Active Participant
0 Kudos

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 ).
1 ACCEPTED SOLUTION

srikanthnalluri
Active Participant
0 Kudos

Could not find any particular reason for this issue, ended up writing two separate BDCs and handled the issue.

Thanks all for your suggestions.

16 REPLIES 16

former_member1716
Active Contributor

Hello S Nalluri,

Not sure if there is a Mode called 'H', below are the possible modes:

  • A = Foreground (Step by step processing will be done by you)
  • N = Background (All the Processing will be done in Background)
  • E = Display Error ( If there is any error, it will be displayed in log otherwise it is similar to background mode)

Also the datatype for the variable should be type C.

Regards!

H is the value from this screen:

Thanks Veselina Peykova Now i understand the issue.

Regards!

FredericGirod
Active Contributor

Use transaction SHDB to record the batch input & generates the corresponding program, that will help you to solve a lot of errors

0 Kudos

I tried with SHDB recording but same result frdric.girod

Mohamed_Mukhtar
Active Contributor

Hi,

Are you appending internal table lt_bdcdata with field name 'BDC_CURSOR' , field value 'RL03T-DUNKL' .

Regards

Mukhtar

former_member1716
Active Contributor
0 Kudos

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.

0 Kudos

I tried it already but for some wired reason it is not working @Satish Kumar Balasubramanian

Sandra_Rossi
Active Contributor
0 Kudos

You should run your batch input in dialog and with CALL TRANSACTION .. MODE 'A' (display all screens) so that to understand what really happens...

srikanthnalluri
Active Participant
0 Kudos

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.

Sandra_Rossi
Active Contributor
0 Kudos

S Nalluri What kind of field is it, a dropdown listbox? Can you post a screenshot?

srikanthnalluri
Active Participant
0 Kudos

sandra.rossi It is a drop down field. Please find the screen shot.lt04-field-dunkl-field-issue.png

Sandra_Rossi
Active Contributor
0 Kudos

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.

Sandra_Rossi
Active Contributor
0 Kudos

Oops Veselina Peykova has already explained the possible values:

  • D for background
  • H for foreground
  • space for system-guided

I don't understand why you have an issue then...

Sandra_Rossi
Active Contributor

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'.

srikanthnalluri
Active Participant
0 Kudos

Could not find any particular reason for this issue, ended up writing two separate BDCs and handled the issue.

Thanks all for your suggestions.