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

GET THE INTERNAL ORDER NUMBER BY INTERNAL ORDER GROUP

Hi everyone! I want to know if there's existing functional module whereas I can get a list of internal order number (AUFNR) based from the internal order group name (AUFGR)? Thanks a lot! Your response will be greatly appreciated!

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 Oct 03, 2005 at 06:32 AM

    Hi,

    Use Function Module HRGPBS_ORDERGROUP_GETDETAIL to get all internal orders for an ordergroup.

    Regards,

    Ville

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 06:34 AM

    Hi,

    First take a look at K_ORDER_SET_CREATE fm..

    The following code may help you in getting the orders based on order group..

    DATA: t_setvalues LIKE SETVALUES

    OCCURS 0 WITH HEADER LINE,

    t_hierarchy LIKE SETHIER OCCURS 0

    WITH HEADER LINE,

    l_date_from LIKE sy-datum,

    l_date_to LIKE sy-datum,

    l_subrc LIKE sy-subrc,

    l_setid LIKE SETHIER-SETID,

    BEGIN OF t_aufnr OCCURS 0,

    aufnr TYPE aufnr,

    END OF t_aufnr.

    CALL FUNCTION 'G_SET_ENCRYPT_SETID'

    EXPORTING

    SETCLASS = '0103'

    SHORTNAME = l_aufgr <Your Aufgr here>

    IMPORTING

    SETID = l_setid.

    CALL FUNCTION 'G_SET_AVAILABLE'

    EXPORTING

    SETNAME = l_setid

    TABLE = 'CCSS'

    IMPORTING

    SUBRC = l_subrc.

    CALL FUNCTION 'G_SET_TREE_IMPORT'

    EXPORTING

    CLIENT = sy-mandt

    SETID = l_setid

    TABNAME = 'CCSS'

    fieldname = 'AUFNR'

    NO_DESCRIPTIONS = space

    NO_RW_INFO = space

    date_from = l_date_from

    date_to = l_date_to

    TABLES

    SET_HIERARCHY = t_hierarchy

    SET_VALUES = t_setvalues

    EXCEPTIONS

    SET_NOT_FOUND = 1

    OTHERS = 3.

    LOOP AT t_setvalues.

    t_aufnr-aufnr = t_setvalues-from.

    COLLECT t_aufnr.

    t_aufnr-aufnr = t_setvalues-to.

    COLLECT t_aufnr.

    ENDLOOP.

    Sri

    Message was edited by: Srikanth Pinnamaneni

    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.