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

Function module for Material

Hi,

I have an text table /bic/tmaterial and an internal table ITAB.

In a function module, i need to get the material numbers of /bic/tmaterial which are not present in ITAB-material(material is a field in internal table ITAB) and for those material no's i need to make an entry in the structure ZSTRUCTURE(which also contains a material no field).

Help me in the code to make the above functionality possible.

Please help as soon as possible

Thanks & Regards,

Pra

Edited by: Alvaro Tejada Galindo on Apr 9, 2008 12:08 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 09, 2008 at 04:08 PM

    With out more information, this code will get you started.

    DATA:
      BEGIN OF mat_rec,
        matnr TYPE matnr,
      END OF mat_rec,
      it_tab     LIKE STANDARD TABLE OF mat_rec,
      zsturcture LIKE STANDARD TABLE OF mat_rec,
      it_file    LIKE STANDARD TABLE OF mat_rec.
    
    "" read your file into it_file.
    
    zsturcture = it_tab.
    LOOP AT it_file INTO mat_rec.
      APPEND mat_rec TO zsturcture.
    ENDLOOP.
    
    SORT zsturcture.
    DELETE ADJACENT DUPLICATES FROM zsturcture.
    

    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.