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

Write Statement

Former Member
0 Likes
918

Hi Experts,

I want to write on the top of my report(under Top-of-page event), the description of the taxcode when I fetch particular Taxcode in the selection-screen.

Suppose in my selection screen I fetch Taxcode A0, I want that in the output of the report I want the deecription of the Taxcode A0 i.e. Zero Output Taxcode.

Is it possible.

Savita

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
887

Savita,

To get the output tax displayed into the output of the report then you it is definite you have to write it in top-of-page event.

Make sure top-of-page event gets triggered, ie you should have atleast one runtime write statement into your code.

top-of-page.

Select * from t007s

where spras = sy-langu

and mwskz = <input parameter field>.

Write:/ t007s-text1.

Regards,

Mahesh

9 REPLIES 9
Read only

Former Member
0 Likes
887

Use TOP-OF-PAGE Event...

Read only

0 Likes
887

Hello Mahesh ,

Can u tell when the user select Tacode suppose A0 in the selection screen , I want to write its description in the report.

How can I do this.

Savita

Read only

Former Member
0 Likes
887

In the event TOP-OF-PAGE select from the table of TAX codes descriptions the one you need and write it.

Regards

Read only

Former Member
0 Likes
887

Savita,

Do you want to write it into the report or in selection screen itself before you run the report option.

If you want to write it in report output after you run report with tax code in selection option, then you have to write the write statement into top-of-page event.

You have to select the tax description into top-of-page event and write it, example table T007S for tax description...

if you want to write it on screen immediately, you have to write it in at selection screen event and use modify screen option to put tax code into corresponding field.

I hope this will solve your issue.

If you need detail help, please let me know.

Regards,

Mahesh

Read only

0 Likes
887

Hello Mahesh,

I want in the output of the report, when the user select taxcode, I want its description in the o/p of the report on the top of the report.

Plz tell me some more detail.

Savita

Read only

Former Member
0 Likes
888

Savita,

To get the output tax displayed into the output of the report then you it is definite you have to write it in top-of-page event.

Make sure top-of-page event gets triggered, ie you should have atleast one runtime write statement into your code.

top-of-page.

Select * from t007s

where spras = sy-langu

and mwskz = <input parameter field>.

Write:/ t007s-text1.

Regards,

Mahesh

Read only

0 Likes
887

Hi experts,

I want in the output of the report the description of the taxcode, as per user selection of taxcode in the selection screen, not all the taxcode.

Savita

Read only

0 Likes
887

hi,

i believe u have the taxcode from the selection screen when u enter the top-of-page event.. In top-of-page, write a select statement to get the desciption of that taxcode into some field of type c. and write that field in the top-of-page event.

. if u do not know which is the table which contains the desciption of the tax code..

goto the data element of taxcode and double click on it to get its domain. in the domain, there will be table name in the field 'value table'.This u will find in the tab , value range..This will be the table from which u can get the description.

Read only

Former Member
0 Likes
887

Hi Savita,

Try this :

PARAMETERS :

p_carrid LIKE spfli-carrid,

p_connid LIKE spfli-connid.

DATA :

t_spfli LIKE STANDARD TABLE OF spfli,

fs_spfli LIKE LINE OF t_spfli.

START-OF-SELECTION.

SELECT carrid

connid

cityfrom

cityto

FROM spfli

INTO CORRESPONDING FIELDS OF TABLE t_spfli

WHERE carrid EQ p_carrid

AND connid EQ p_connid.

LOOP AT t_spfli INTO fs_spfli.

WRITE 😕 fs_spfli-cityfrom,

fs_spfli-cityto.

ENDLOOP.

TOP-OF-PAGE.

LOOP AT t_spfli INTO fs_spfli.

WRITE 😕 fs_spfli-carrid,

fs_spfli-connid.

ENDLOOP.

Regards,

Swapna.