Application Development and Automation 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: 
Read only

SAP Script printing problem

Former Member
0 Likes
445

Hi All,

I serched meany forums on this but i could't find the solution can any one please help me on this ..

probelm is :

i copied standard script F110_D_AVIS in this i want to change footer address and thanks and regards fields

for this i created a subroutinepool and i called ,but the footer and thanks & regards field not printing in script out but ,

in debug i can see value in script window variable.

Please advice me .

Script Code


DEFINE &NAME1& = ' '
PERFORM GET_COMPANY IN PROGRAM ZFI_SS_PAYMENT1
USING &REGUH-ZBUKR&
CHANGING &NAME1&
&NAME1&KK
ENDPERFORM

form get_company tables input
                        output.
  it_input_table[] = input[].
  it_output_table[] = output[].
*                        st_adrc structure itcsy.
  data lv_zbukr type reguh-zbukr occurs 0 with header line.

    read table it_input_table index 1.
  move it_input_table-value to lv_zbukr.
*  lv_zbukr = reguh-value.
  select single adrnr  from t001 into lv_adrnr
      where bukrs = lv_zbukr.

  select single * from adrc into st_adrc
    where addrnumber  = lv_adrnr.
    it_output_table-VALUE = st_adrc-NAME1.
  it_output_table-name = 'NAME1'.
  modify it_output_table index sy-tabix.
  output[] = it_output_table[].
endform.                    "get_company

Thanks,

KK

3 REPLIES 3
Read only

Former Member
0 Likes
420

Hi

one way of reading is read the key first and then update the value .

try using the below code :

READ TABLE OUT_TAB WITH KEY NAME = 'NAME1'.      "

  IF SY-SUBRC IS INITIAL.

    OUT_TAB-VALUE = ST_ADRC-NAME1 .
      
    MODIFY OUT_TAB INDEX SY-TABIX.
  ENDIF.

one doubt :

DEFINE &NAME1& = ' '
PERFORM GET_COMPANY IN PROGRAM ZFI_SS_PAYMENT1
USING &REGUH-ZBUKR&
CHANGING &NAME1&
&NAME1&KK                   ---- what is this KK?
ENDPERFORM

Try to give outside the perform :

&NAME1&KK - check this also

Thanks

hariharan

Read only

0 Likes
420

Hi Hari,

Thanks for reply.

my problem is solved by my self i have to give the command * instead of /:

Thanks a lot for support.

Read only

Former Member
0 Likes
420

Thanks All.

Edited by: kkumar.p on Aug 10, 2011 7:35 AM