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: 

APPEND command error

Former Member
0 Kudos

Hi All,

I am facing a strange situation where in the APPEND command work fine where I run my Interface in foreground but when I run the interface in background mode it doesnt APPEND the values to the select options.

I have coded the below code in INITIALIZATION.


INITIALIZATION
  SELECT SINGLE MAX( run_nr )
                FROM ztsifoutdet
                INTO  gv_temp_nr
                WHERE sys_id EQ p_sysid.                    

  SELECT SINGLE run_date
                FROM ztsifoutdet
                INTO  gv_date
                WHERE sys_id EQ p_sysid
                AND run_nr EQ gv_temp_nr.     
              
  gv_temp_nr = gv_temp_nr + c_1.

  CLEAR s_bdter.
  s_bdter-sign = 'I'.
  s_bdter-option = 'BT'.
  s_bdter-low = gv_date.
  s_bdter-high = sy-datum.
  APPEND s_bdter.

Here the APPEND statement doesnt append values to S_BDTER when ran in background. ITs quite strange.

Please reply.

Regards

Abhii

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

As far as I know, INITIALIZATION is processed before values from selection variants are pulled in. Check that the variant that you use for processing the program in background contains the desired values.

Alternatively try filling the values in event AT SELECTION-SCREEN OUTPUT.

Thomas

3 REPLIES 3

ThomasZloch
Active Contributor
0 Kudos

As far as I know, INITIALIZATION is processed before values from selection variants are pulled in. Check that the variant that you use for processing the program in background contains the desired values.

Alternatively try filling the values in event AT SELECTION-SCREEN OUTPUT.

Thomas

former_member1245113
Active Contributor
0 Kudos

HI Abhi,

INITIALIZATION " Change it to At selection-screen output
  SELECT SINGLE MAX( run_nr )
                FROM ztsifoutdet
                INTO  gv_temp_nr
                WHERE sys_id EQ p_sysid.                    
 
  SELECT SINGLE run_date
                FROM ztsifoutdet
                INTO  gv_date
                WHERE sys_id EQ p_sysid
                AND run_nr EQ gv_temp_nr.     
              
  gv_temp_nr = gv_temp_nr + c_1.
 
  CLEAR s_bdter.
  s_bdter-sign = 'I'.
  s_bdter-option = 'BT'.
  s_bdter-low = gv_date.
  s_bdter-high = sy-datum.
  APPEND s_bdter.

Cheerz

Ram

Former Member
0 Kudos

Hi,

As every one said.. write it in selection-screen-output, Whenever face this kind of problem related to job. try debuging the job(JDBG)

Edited by: Anurag_n on Apr 12, 2010 4:10 PM