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

screen modify with using a field data type 'DATS'

Former Member
0 Likes
747

Hi together,

I want to modify a date field (e.g, paramter field 'pa_date like bseg-budat') by using 'Loop at screen.....modify screen'

or FM 'DYNP_VALUES_UPDATE' respectively.

Since data type 'DATS' consists of 8 digits it´s not possible to modify the field with correct format (e.g. YYYY/MM/DD, or DD/MM/YYYY using 10 digits) - that meens you can´t set the '/' or '.' .

For sure, you can use the 8-digit (internal) format (YYYYMMDD) and hit enter afterwards, but there must be some other

solution. (cf. Trx. F110)

Thanks for any help

6 REPLIES 6
Read only

Former Member
0 Likes
648

Hi,

You cannot assign values using the LOOP AT SCREEN option. This can be used only to set the attributes of the field.

If you want to assign a value to a DATS field, you will have to assign it in YYYYMMDD format only. For example: -

pa_date = '20100701'.

Regards,

Shameek

Read only

Former Member
0 Likes
648

u can modify the date field in output.....!

and show the date like 01/07/2010

let me know where u want to modify date in slection screen or in output....!

Read only

0 Likes
648

Hi,

OK, that´s what I´m doing exactly...

...

AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_laufi.

...

dynpfields-fieldname = 'PA_LAUFD'.

dynpfields-stepl = 0.

dynpfields-fieldvalue = iv_laufd. <-- iv_laufd is using the internal format YYYYMMDD

dynpfields-fieldinp = 'X'.

APPEND dynpfields.

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

TABLES

dynpfields = dynpfields

EXCEPTIONS

invalid_abapworkarea = 01

invalid_dynprofield = 02

invalid_dynproname = 03

invalid_dynpronummer = 04

invalid_request = 05

no_fielddescription = 06

undefind_error = 07.

...

Read only

0 Likes
648

Hi Gerd,

Try

WRITE iv_laufd TO dynpfields-fieldvalue DD/MM/YYYY.

instead of

dynpfields-fieldvalue = iv_laufd.

Regards,

Ana Luisa.

Read only

0 Likes
648

Hi ,

That depends on the Date format in the User profile, for example my sap logon has the date format DD.MM.YYYY so if i run the any selection screen or Tcode with Date it will fill with the same format.

Just look at this for your profile: System -> user profile->own data.

Reagrds,

Bharani

Read only

0 Likes
648

Hi Ana Luisa,

Many thanks...it works without a hitch now.

Sorry, I don´t not how to give you 'points' - I´d give you at least 100 ;o)