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

Display selected values .

Former Member
0 Likes
388

Hello everyone.

This code displays the values that has been selected in the selection screen. As it is now. If nothing is selected the value 'all' is displayed otherwise the value in shortform for example '01' is shown. The thing i want to do is to dispay this value '01' in plain text instead. I have made a try here but it doesn't work.

Anyone who knows how to do?

define value_fill.
  lv_pos = 0.
  clear &2.
  if &1 is initial.
    write : 'All' to &2.
  else.
    describe field &1-low length lv_len in character mode.
    loop at &1.

<b><i>*    if not S_TRFGB-LOW is initial.
*    select single tartx into &1 from t510a
*                   where molga eq '23' and
*                   trfar eq p0008-trfar." Pay Scale Type
*    endif.</i></b>

      if sy-tabix > 1.
        write ','     to &2+lv_pos(1).
        lv_pos = lv_pos + 1.
      endif.

      write &1-low to &2+lv_pos(lv_len).
      lv_pos = lv_pos + lv_len.
      if not  &1-high is initial.
        write '-'     to &2+lv_pos(1).
        lv_pos = lv_pos + 1.
        write &1-high to &2+lv_pos(lv_len).
        lv_pos = lv_pos + lv_len.
      endif.
      if lv_pos > 60.
        exit.
      endif.
    endloop.
  endif.
end-of-definition.

Best Regards

Claes

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
346

Hi Claes,

Please see the below sample code, is this the

requirement you are looking for? if nor can u please

explain it.


REPORT ZSRILATHA .

tables : mara.

data : begin of tab occurs 0,
         matnr like mara-matnr,
         maktx like makt-maktx, 
       end of tab.

select-options : matnr for mara-matnr.


if not matnr[] is initial.
  select matnr
         maktx
    into table tab
    from makt
    where matnr in matnr.
 if sy-subrc = 0.
   loop at tab.
     write : / tab-maktx.
   endloop.
 endif.
else.
  write : 'All'.
endif.

Thanks&Regards,

Siri.

Message was edited by: Srilatha T

2 REPLIES 2
Read only

Former Member
0 Likes
347

Hi Claes,

Please see the below sample code, is this the

requirement you are looking for? if nor can u please

explain it.


REPORT ZSRILATHA .

tables : mara.

data : begin of tab occurs 0,
         matnr like mara-matnr,
         maktx like makt-maktx, 
       end of tab.

select-options : matnr for mara-matnr.


if not matnr[] is initial.
  select matnr
         maktx
    into table tab
    from makt
    where matnr in matnr.
 if sy-subrc = 0.
   loop at tab.
     write : / tab-maktx.
   endloop.
 endif.
else.
  write : 'All'.
endif.

Thanks&Regards,

Siri.

Message was edited by: Srilatha T

Read only

hymavathi_oruganti
Active Contributor
0 Likes
346

can u be a bit clear abt ur requirement,

u want in plain text means ??????