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

Formatting?

Former Member
0 Likes
839

Hi Experts,

I need to display the selection screen selection criteria on basic list.

So,

My code is like,

select-options: s_kunnr like kna1-kunnr.

write : 'Customer:' s_kunnr

.

it showing like,

customer: IEQ0000000404038

so, i tried like first and second of the folwoing, but no result!

1- move s_kunnr to cust.

2- write s_kunnr to cust left-justified no-zero.

write : 'Customer:' cust.

again showing the same!

How to fix it?

ThanQ.

Message was edited by:

Sridhar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
809

Hi,

Use below code for your requirement.

data : lv_rep like rsvar-report, " Report Name

lv_var like rsvar-variant. " Variant Name

  • Internal table to hold Selection Criteria data.

data : it_infotab(100) type c occurs 0 with header line.

lv_rep = sy-cprog.

lv_var = sy-slset.

call function 'RS_COVERPAGE_SELECTIONS'

exporting

report = lv_rep

variant = lv_var

no_import = 'X'

tables

infotab = it_infotab

exceptions

error_message = 1

others = 2

variant_not_found = 3.

if sy-subrc = 0.

skip 1.

loop at it_infotab from 5.

shift it_infotab by 2 places.

if sy-tabix = 5.

write: /2(79) it_infotab color col_heading.

else.

write: /2 it_infotab.

endif.

endloop.

endif.

thanks,

sksingh

7 REPLIES 7
Read only

ferry_lianto
Active Contributor
0 Likes
809

Hi,

Please try this.


write : 'Customer:', s_kunnr-low.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
809

Try s_kunnr-low and s_kunnr-high.

Thanks,

SKJ

Read only

aabhas_wilmar
Contributor
0 Likes
809

select-options contains a range with a low value and high value which can be accessed by <select-option>-low or <select-option>-high...

so write the appropriate one... or something like

write:/ 'Customers from' s_kunnr-low 'to' s_kunnr-high.

hope it helps.

Aabhas

Read only

Former Member
0 Likes
810

Hi,

Use below code for your requirement.

data : lv_rep like rsvar-report, " Report Name

lv_var like rsvar-variant. " Variant Name

  • Internal table to hold Selection Criteria data.

data : it_infotab(100) type c occurs 0 with header line.

lv_rep = sy-cprog.

lv_var = sy-slset.

call function 'RS_COVERPAGE_SELECTIONS'

exporting

report = lv_rep

variant = lv_var

no_import = 'X'

tables

infotab = it_infotab

exceptions

error_message = 1

others = 2

variant_not_found = 3.

if sy-subrc = 0.

skip 1.

loop at it_infotab from 5.

shift it_infotab by 2 places.

if sy-tabix = 5.

write: /2(79) it_infotab color col_heading.

else.

write: /2 it_infotab.

endif.

endloop.

endif.

thanks,

sksingh

Read only

0 Likes
809

ThanQ to all.

Read only

Former Member
0 Likes
809

hi,

Make use of the function module <b>FM_SELECTION_CRITERIA_PRINT </b>to display the selection-screen values instead of formatting for each and every parameter.

CALL FUNCTION 'FM_SELECTION_CRITERIA_PRINT'

EXPORTING

I_REPORT_NAME = SY-CPROG

XFELD = 'X'.

Regards

Sailaja.

Read only

0 Likes
809

Hi,

u can make use of the FM Print_selections.