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

simple doubt

Former Member
0 Likes
535

i have

btrtl for pa0000-btrtl in selection screen.

(btrtl is personal sub area number)

when i select this range in sel screen., i want to display the personal sub area text in the report output.

sub-area text is in t001p-btext.

can anyone tell me!

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
497

Hi,

I cannot see BTRTL in pa0000.

But you can make the select statement as

types : begin of ty,

btext type t001p-btext,

end of ty.

data : i_btext type standard table of ty,

w_btext type ty.

select btext into table i_btext from t001p where btrtl in s_btrtl.

loop at i_btext into w_btext.

write w_btext-btext.

endloop.

Kindly reward points if it helps.

2 REPLIES 2
Read only

Former Member
0 Likes
497

Here is a sample code.


SELECT-OPTIONS S_BTRTL FOR PA0000-BTRTL.

SELECT BTRTL FIELD1 FIELD2 etc FROM DBTABLE INTO TABLE ITAB WHERE BTRTL IN S_BTRTL AND, OR OTHER CONDITIONS.

SELECT BTRTL BTEXT INTO TABLE ITAB_TEXT FROM T001P
                  WHERE BTRTL IN S_BTRTL
                    AND SPRAS = SY-LANGU.

END-OF-SELECTION.

LOOP AT ITAB.
  WRITE:/ ITAB-BTRTL.
  CLEAR ITAB_TEXT.
  READ TABLE ITAB_TEXT WITH KEY BTRTL = ITAB-BTRTL.
  WRITE: ITAB_TEXT-BTRTL.
ENDDLOOP.

Srinivas

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
498

Hi,

I cannot see BTRTL in pa0000.

But you can make the select statement as

types : begin of ty,

btext type t001p-btext,

end of ty.

data : i_btext type standard table of ty,

w_btext type ty.

select btext into table i_btext from t001p where btrtl in s_btrtl.

loop at i_btext into w_btext.

write w_btext-btext.

endloop.

Kindly reward points if it helps.