cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Date in LSMW

Former Member
0 Kudos

Hi friends,

Previously i had posted a post regarding," How to upload HR master data using LSMW"

and i wanted to Know how to upload OM data.

I was asked to use the t-code pp01.

I did that and I tried to upload OM data.

My source fields are---

OTYPE BEGDA ENDDA SHORT STEXT

S 19000101 99991231 ACCOUNTNG MANAGER ACCOUNTING MANAGER

Everything is working fine . I have done the recording for the above fields only in PP01.

I first placed the cursor in Object Type. Then selected Position from it.

Then pressed enter. Under active tab the Infotypes appeared.

I need to upload into Objects infotype. HRP1000

so I selected Objects. Then clicked on "create infotype".

It took me to the next screen.

There gave the BEGDA ENDA SHORT and STEXT.

clicked on save and the recording was complete.

It said record created .

Then i did the rest things fine.

Import data fine.

Display imported data fine.

convert data is fine too.Everything looks great. The whole 350 records.

Now when i see display converted data.

For BEGDA its showing 19000101 . For ENDDA its showing 12-31-9999 and that's fine.Thats how it should be.

When i run the session in Background. The data obviously is not getting uploaded.

The BEGDA is screwing me here.

Please someone provide me inputs on this.

i tried the following for BEGDA-----

In field mapping option. Step 5. I wrote this for BEGDA.

code--

SAPTABLE-BEGDA0(2) = SOURCETABLE_DATE-BEGDA 6.

SAPTABLE-BEGDA2(2) = SOURCETABLE_DATE-BEGDA4.

SAPTABLE-BEGDA+4(4) = SOURCETABLE_DAT-BEGDA.

Is the above code right???

Inputs please.

If i can sove this do this i will be able to upload for other OM infotypes too.

Thanking you all in advance,

Hari Kiran

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hari

Please give a try

Fist go to Systems-User Profile-Own data-Defaults(TCode: SU3) and change the date format to DD.MM.YYYY, save and logg out from system.

Log in again and now you start doing the LSMW recording once again. The recoding which you have mentioned is absolutely correct,but the start date you have given is 01.01.1900(this you need to check from when you are going to create the position or relationship and give the actual date) and save.

Now when it comes to field mapping, you have do decide whether you want to map the date using source field you have defined in third step of LSMW or you want to give a default date. If its a default date then go to Constant which is there in the heading top right and give the start date as 01011900 and end date as 31129999 and save

Now you try reading the data, i hope it will work, if not please let me know.

Regards

Santhosh.S

Former Member
0 Kudos

Santhosh,

Thanks a ton.

I have been pulling my hair for the past 24 hours over this.

I will do the things you have suggested and get back to you.

please watch this thread.

I need your help.

Once again thank you so much.

warm regards,

Hari Kiran

Former Member
0 Kudos

Hi santosh,

I did the changes you asked me.

Things are looking far better.

I went to Systems-User Profile-Own data-Defaults. made some changes there for the date format. Chose yyyy.mm.dd

and it worked.

And after recording gave default value for BEGDA and ENDDA.

and in " Display converted Data" I was able to see it as "1900-01-01" and "9999-12-31"

But but but,

when I am finally executing it in foreground, data is not getting placed on the screen field.

1900 is changing to 2000. Its considering only 00.

and 9999 is changing to 1999. And I am getting the error., " Start date is greater than enddate"

I tried constant in the step " Field mapping and conversion rules", but it wasn't taking date as yyyy.mm.dd

Is there anything that the basis guys need to fix. I mean date configuration for the system.

I knew I was in trouble when BEGDA was the the year 1900. Obviously there will be conflict. Its picking up 00

and changing it to year 2000.

Any inputs will be valuable.

Regards,

Hari Kiran

Former Member
0 Kudos

Hi,

Y dont you change the text file format?

Instead of passing 19000101 ,pass 01011900.

Regards,

Manoj.

Former Member
0 Kudos

Hi Manoj,

Thanks for the reply.

I will do that. Try to insert couple of records

and get back to you.

Regards,

Hari Kiran

Former Member
0 Kudos

Hi Hari

Could you please sent me the details of activity you have done, I hope I can hlep you.

Regards

Santhosh.S

Former Member
0 Kudos

Hi,

santosh.

Thanks for asking.

one of the changes I made based on suggestion was--

Go to .........

system>user profile> own data.

there in the defaults tab, for date format field

changed it to yyyy.mm.dd.

The I logged off and logged in again.

Ok, now I am trying to upload OM data using LSMW batch input session method.

I am trying to upload into infotype HRP1000[objects]

My source fields are OTYPE ,OBJID,BEGDA,ENDDA,SHORT,STEXT.

And the record is like this--

S 19000101 99991231 ACCOUNTING MANGER ACCOUNTING MANAGER

For OBJID there is no data in the flat file. It will be generated by the system. I have a question friends ," Do I need to record OBJID during recording then????

In field Mapping and Conversion rules, I have selected constant for BEGDA and ENDDA. And I gave the values '19000101'

and '99991231'

now in the step display converted data it's Showing the data properly as-------

S 19000101 99991231 ACCOUNTING M ACCOUNTING MANAGER.

But when I am executing it in foreground date is not getting placed properly.

please go through my above postings too for more info..

Thanking you all in advance,

regards,

Hari Kiran

Former Member
0 Kudos

Hi Santosh,

waiting for your reply. I have another question for you.

What is the max. no. of record limitation for LSMW.

Is it 5000 or 10,000.??

If it's 5000. Is it 4,999 or exactly 5000.???

Reply soon

Regards,

Har Kiran

Former Member
0 Kudos

Hi Hari

My my belief, there is no limit in the number of records you can upload. Especially in your case, there is only 5000, which the system will accepts. Please add my id santoshss at the rate yahoo dot com or santhoshsss at the rate gmail dot com.

Come online, we will solve this issue.

Regards

Santhosh.S

Former Member
0 Kudos

Hi santosh,

I have taken note of your email.

Dont have access to all sites from office.

Only SDN is allowed.

catch you after 9 tonight on gmail and yahoo messnger.

ok.

Thank u so much.

Regards,

Hari Kiran

Former Member
0 Kudos

guess what frnds,

I successfully uploaded 10 records for HRP 1000( objects infotype.)

regards,

Hari

Former Member
0 Kudos

Hi Hari,

I am trying to upload the OM infotype 1000 using LSMW. i followed the steps u had mentioned in all the threads above.

The upload file also contains the fields u have mentioned.

But when its processing in the foreground in the first screen itself i am getting an error as "No batch input data for screen SAPMH5A0 5000".

Please suggest what all needs to be done to rectify it..

thanks!!

Regards,

Vijetha

Former Member
0 Kudos

Hi ... I'm trying the batch uploads for 1001 relationships ...and its giving

and having the same issue....

Getting

sapmh5A0 5000


error on the relationship page the date format is

0407201331129999

and have uploaded 1 record earlier in the same format ....


Kindly help if you have the answer....

Former Member
0 Kudos
Former Member
0 Kudos

Hi. Try to upload OM infotypes with HRMD_A idocs, This is more flexible solutions rather thane batch input.

Former Member
0 Kudos

oh ok..will check it out thanx

Answers (0)