Skip to Content
author's profile photo Former Member
Former Member

lsmw coding point

Hi Friends,

when i am doing lsmw to uploading the data..

it is compulsory to write the Code???

if we want to write the code..how to write? how to write the conditions???

can any one give one example??

regards,

Vijay.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2007 at 12:15 PM

    Hi Vijay,

    Its not always compulsory to write coding in lsmw. You have to write coding when we have to introduce some conditions on the data being uploaded. You can put the code in the "Maintain field mapping and conversion" section.

    Also look at these discussions.

    lsmw-coding

    abap-coding-in-lsmw

    Regards

    Aneesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2007 at 12:27 PM

    Hi Vijay,

    Remember these points while doing LSMW.

    Below these coding u have to do in 5th step(Mapping)

    if u dont have any code to write atleast u have to pass the / symbol in case for that particular field which there is no value.

    instead of these source structure and target structure,

    specify what ur using.

    For EG:AS91_ZTABLE-ANLKL (source field) ,,

    BALTD-ANLKL(target field).

    ************

    1) this code u have to write for every field .

    IF NOT AS91_ZTABLE-ANLKL IS INITIAL.

    BALTD-ANLKL = AS91_ZTABLE-ANLKL.

    ELSE.

    BALTD-ANLKL = '/'.

    ENDIF.

    its better to upload the date formate like yyyymmdd.

    but in our system we dont have this kind of formates so better to choose yyyy.mm.dd and do change ur date format in flat file itself in the above format(yyyymmdd).

    if u dont want to change in the flat file , just rite ur code in LSMW itself ,

    for this u have to write coding in Mapping(5th step) .

    go to the particular field in change mode and double click on that field there u have to write like this.

    2) like this u have write for the date fields.

    For Eg:

    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.

    If u perfectly know there is the value for every field then no need to write this code (if u write also there is no problem).

    Kindly know if anything else u want anything

    Reward points if helpful.

    Thanks

    Naveen khan

    Message was edited by:

    Pattan Naveen

    Message was edited by:

    Pattan Naveen

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.