Application Development 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: 

Change date from YYYYMMDD to DD.MM.YYYY + change header of selection screen

Former Member
0 Kudos

Hi all,

I build a query with sq02 and sq01, and in the output I print the input fields by writing the following code in the TOP-OF-PAGE event (thanks to Michal Kunze):

data: lt_seltab type standard table of rsparams

with header line.

data: lv_report like sy-repid.

lv_report = sy-repid. "do not pass sy-repid directly

call function 'RS_REFRESH_FROM_SELECTOPTIONS'

exporting

curr_report = lv_report

tables

selection_table = lt_seltab.

  • you can remove some parameters with

  • 'DELETE LT_SELTAB WHERE...' statement,

  • before display, if necessary

call function 'RS_LIST_SELECTION_TABLE'

exporting

report = lv_report

seltext = 'X'

  • dyn_range =

newpage = ' '

  • screennr = 1000

tables

sel_tab = lt_seltab

exceptions

sel_tab_empty = 1.

I have 2 question:

<b>1.</b> I want that the input field DATE will be printing in the format DD<b>.</b>MM<b>.</b>YYYY

<b>2.</b> In the top of the printing the input fields, it prints the header "Objects for selection screen 1000",

How can I change the text ,or prevent it from being printed?

thanks,

Itzhak.

4 REPLIES 4

Former Member
0 Kudos

Hi Itzhak,

1. Try fm CONVERSION_EXIT_MODAT_OUTPUT

2. in your report definition use the option REPORT .... NO STANDARD PAGE HEADING.

regards

Siggi

0 Kudos

Hi,

I'm new with developing ABAP queries, and I got this code from someone.

1. I don't know how to use CONVERSION_EXIT_MODAT_OUTPUT on the <b>lt_seltab</b> field.

2. I wrote:REPORT lv_report NO STANDARD PAGE HEADING.

and got Error message: Each ABAP program can contain only one "REPORT" or "PROGRAM" or "FUNCTION-POOL" statement.

By the way, I wrote all the code in the TOP-OF-PAGE in sq02.

thanks,

Itzhak

0 Kudos

Hi Itzhak,

1. You need to convert the date field in your internal table LT_SELTAB to date format DDMMYYYY. You can do something like this.

Loop at LT_SELTAB.

if LT_SELTAB-SELNAME = <datefieldname>.

write lt_seltab-low to lt_seltab-low DD/MM/YYYY.

modify lt_seltab.

endif.

ENDLOOP.

2. You can't change the list heading because this function does not allow it.

0 Kudos

Hi

Your code has no syntax errors

But the output has not changed. It is still YYYYMMDD

Do you have a better solution?

thsnks

Itzhak.