Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8800

How to clear selection screen parameters before calling transaction?

$
0
0

Hello Experts,

 

I am trying to call transaction KSB1 and display result in an ALV using  -

call transaction 'KSB1' using gt_bdcdata
                         mode   'E'"mode

 

Problem:

1) First I call transaction KSB1 manually and fill in the selection screen with Cost Center and Posting Date and execute.

2) Next I execute my report to display KSB1 output on ALV by providing different selection screen data.

    I use CALL TRANSACTION as shown below :

 

                  ...

         refresh: gt_bdcdata.
         perform:
         fill_bdc_data using iv_program  '0100' 'X'  ' '             ' ',
         fill_bdc_data using ' '         ' '    ' '  'BDC_OKCODE'    '=ONLI',

         fill_bdc_data using 'SAPLALDB'  '3000' 'X'  ' '             ' '.

         lv_cnt = 1.
         loop at it_kostl into ls_kostl.
           call function 'CONVERSION_EXIT_ALPHA_INPUT'
             exporting
               input  = ls_kostl-kostl
             importing
               output = ls_kostl-kostl.
           concatenate 'RSCSEL-SLOW_I(' lv_cnt ')' into lv_fldname.
           perform fill_bdc_data using   ' '    ' '  ' '  lv_fldname   ls_kostl-kostl.
           lv_cnt = lv_cnt + 1.
         endloop.

         lv_start+0(2) = iv_start+4(2).
         lv_start+2(2) = iv_start+6(2).
         lv_start+4(4) = iv_start+0(4).

         lv_end+0(2) = iv_end+4(2).
         lv_end+2(2) = iv_end+6(2).
         lv_end+4(4) = iv_end+0(4).

         perform:
         fill_bdc_data using iv_program  '0100' 'X'  ' '             ' ',
         fill_bdc_data using ' '         ' '    ' '  'R_BUDAT-LOW'   lv_start,
         fill_bdc_data using ' '         ' '    ' '  'R_BUDAT-HIGH'  lv_end,
         fill_bdc_data using ' '         ' '    ' '  'P_DISVAR'      lv_variant.
        
         call transaction 'KSB1' using gt_bdcdata
               mode   'E'"mode

                  ...

 

In-spite of passing new selection values from my report, the result is still being displayed based on the selection screen data that I provided while calling transaction KSB1 manually.

 

I used FREE/DELETE from memory id, it did not work.

How do I delete the selection screen data and then call transaction from my report?


Viewing all articles
Browse latest Browse all 8800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>