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

Date format LSMW

Former Member
0 Likes
2,276

Hi all,

I am using LSMW. The internal format is yyyymmdd. In my requirement i have to pass current-date sy-datum in a screen field using lsmw.

differrent users may have differrent date formats. how can i overcome this. suggest me.

regards

helpful answeres are surely rewarded.

Hi all,

I am using LSMW. The internal format is yyyymmdd. In my requirement i have to pass current-date sy-datum in a screen field using lsmw.

differrent users may have differrent date formats. how can i overcome this. suggest me.

regards

helpful answeres are surely rewarded.

4 REPLIES 4
Read only

Former Member
0 Likes
1,332

Hi

Keep the date in the file in the format yyyymmdd and use it in LSMW

irrespective of the users defualt settings it will be taken care

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
1,332

Hi,

Get the Format from the User settings. ie got to SU01D TCODE, you could see the date format which is used there. of you can select the date fromat from USRxx table.

In the Maintain field mapping and conversion rules in Change mode, you double click of the respective field name and get into the editor screen. There you can validate the date or convert the date into your format.

And Again in the Read data you can Check the format also, while uploading data. It will automaticly converts.

Regards

Read only

Former Member
0 Likes
1,332

Hi Priyanka,

Before uploading the data just do some changes for ur date formate ,

go to System->userprofile->owndata and

select 4th option as per this code This is the Sample Code for a particular field) and save it and logoff and logon,

whatever the date fields you have in the input file just write code like this in the Mapping Step ( no need to change in the input file for a particular field)

if not as91_ztable-AKTIV is initial.

replace '.' with '' into as91_ztable-AKTIV.

replace '.' with '' into as91_ztable-AKTIV.

condense as91_ztable-AKTIV no-gaps.

BALTD-AKTIV = AS91_ZTABLE-AKTIV.

else.

baltd-aktiv = '/'.

endif.

let me discuss if any issues,

Thanks

Naveen khan

Read only

Former Member
0 Likes
1,332

Execute in the background - the program will run under the system user id which should use the internal date format exclusively.