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

LSMW With multiple files

Hi All,

I am trying to see if it is possible to use two files in one LSMW session.

I have a file with two columns:

Legacy code and Amount

I have another fie which is a lookup table and have two columns

Legacy code and SAp wage type

Is there way so that I can use these two files to upload the SAP wage type and deduction amount to PA0014 in one step.

Basically is there a way that first file will do a look up for the SAP WAGE Type from the second file?

I hope this is not confusing 😊

Thanks,

~Mark

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 07:03 PM

    Hi,

    IN the step "Maintain field mapping and conversion rules" you can write code..

    In "global data definitions and declarations" declare the internal table ..

    In "Before processing the data" upload the data from the look up file and store it in an internal table..

    In "BEGIN_OF_TRANSACTION" read the internal table and assign to correct field..

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Naren,

      Thanks for your reply. where are these steps

      In "global data definitions and declarations" declare the internal table ..

      In "Before processing the data" upload the data from the look up file and store it in an internal table..

      In "BEGIN_OF_TRANSACTION" read the internal table and assign to correct field..

      Thanks,

      ~Mark

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:09 PM

    Hi,

    In LSMW in the step.."Maintain field mapping and conversion rules" you can write code...

    If you are not getting the

    __GLOBAL_DATA__

    __BEGIN_OF_PROCESSING__ in this step...Then do the following..

    In the initial screen of your project (where all the steps are shown)..In the menu..choose EXTRAS -> PERSONAL MENU..you will get a popup..In that Check the checkbox against the text "Maintain field mapping and conversion rules"...Then press enter..

    Now go to the step "Maintain field mapping and conversion rules"...You will all the events..

    Hope this helps..

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Naren,

      GLOBAL_DATA__

      __BEGIN_OF_PROCESSING__

      now in the Maintain field mapping and conversion rules". Now how do I declare the internal table and read the file in the internal table?

      ~Mark

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:43 PM

    Hi,

    When you get there double click on the line which says..

    Coding: * __GLOBAL_DATA__

    Then you will get a editor..

    You can write code to declare the internal table..

    DATA: BEGIN OF ITAB OCCURS 0,

          • Your file structure...

          END OF ITAB.

          In the

          • __BEGIN_OF_PROCESSING__

          Use the function module GUI_UPLOAD to load the file and move it to an internal table ITAB..

          Thanks,

          Naren

          Add a comment
          10|10000 characters needed characters exceeded

          • Former Member

            Hi,

            One last question. I read in some forums that LSMW supports files heirarchy. If so, then if I have two files with same column names then shouldn't LSMW allow me to do the lookup from the 2nd file without any ABAP codes?

            ~Mark

        • author's profile photo Former Member
          Former Member
          Posted on Oct 16, 2006 at 09:27 PM

          I am sorry... I am not sure about file hierarchy..

          Thanks,

          Naren

          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.