Skip to Content
author's profile photo
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    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 comment
    10|10000 characters needed characters exceeded