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!

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

Similar Messages

  • Internal Order Number For DBM order

    Hi All,
    How to get the internal order no for the SAP DBM order number,?
    from which table can we fetch ?
    Regards,
    Rangakarthick

    Hi,
    In DBM order an internal order can be created on header level and on split level.
    On split level internal order is created within event BILLING_CREATE.
    The internal order (like other documents related to the DBM order like e.g. reservation as well) are displayed in the order document flow.
    In table /DBM/ORD_DOCFLOW you can fetch internal order number from DBM order.
    But its a little bit tricky:
    In field INSTID_A you have to select business object BUS2400 representing the DBM order.
    Field INSTID_B is populated with business object BUS2075 and the internal order number.
    e.g. if you want to select all internal orders for DBM order 29926 you have to select in initial screen
    field INSTID_A:
    "BUS2400   0000029926*" (consider: there are 3 spaces after BUS2400)
    and field INSTID_B:
    "BUS2075*"
    Example from image: DBM order: 299826
    Internal order header: (no split) 121526
    Internal order split: 235320 (same for both splits 0001 and 0002)
    Regards
    Joachim

  • Getting purchase order number from sales order number

    Hi Experts,
    My requirement is to fetch the following values from a sales-order number:
    Purchase Order Number,
    Delivery Date
    Order Type(Source of Order EDI/EFAX/..)
    Ship To,
    Sold To.
    We are trying to fetch this data from the ECC system in our CRM system.We are exploring the possibilty of RFC calls to get the data from ECC system.
    Is there any standard FM present in ECC which gives the above information from the sales order number?
    Thanks in advance
    Regards
    Shilpi

    Hi,
    Check the FM BAPISDORDER_GETDETAILEDLIST
    It provides the whole data for a particular Sales order which you need to provide Sales order number in the table 'SALES_DOCUMENTS' in tables parameter.
    You have to provide the view what you need and in the import parameter 'I_BAPI_VIEW' like all the views that are in the tables parameter...
    HEADER, ITEM etc...
    The fields
    PO_METHOD
    PURCH_NO
    REQ_DATE_H
    SOLD_TO " will provide you the details you need in the table 'ORDER_HEADERS_OUT'
    SHIP_POINT in ORDER_ITEMS_OUT table provides the ship to
    Regards
    Sarves

  • How to get the field name of an internal table during runtime?

    How to get the field name of an internal table during runtime?

    Hi  Sudhir,
    Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
    Example Code:
        <b>  DATA: v_field(60).                        " Insert this code.
         GET CURSOR FIELD v_field.        " Insert this code.</b>
         <b>CHECK v_field = 'ITAB-KUNNR'.    " Insert this code. (or)
    Write: v_field.</b>
    Regards,
    Ramganesan K.

  • Can I get the BT Sport App if I order BT Sport on ...

    I'd just like a bit of help clarifying something up as i'm struggling to understand how this works, so i've looked at the FAQ about the BT Sport App and found this:
    Who can get the BT Sport App?
    The BT Sport App and online access at btsport.com is included when you take the BT Sport Pack on the Sky Digital Satellite Platform or BT TV.
    If you're a BT Broadband customer but not a BT Sport television channel subscriber, you can add the BT Sport App and online access to your BT products by logging into My BT on or after 1 August. Then simply download the app from your device's app store, or go to btsport.com from 1 August to start viewing.
    Now I don't have BT Broadband/TV or anything but i'd really like to get BT Sport as it's now my only way to watch UFC, my grandad has Sky TV with sky sports at the moment and I use his Sky Go to watch the footy
    If I order BT Sport from his Sky account and pay the 12£ per month for bt sport, can I use the BT Sport App to watch the UFC/Footy etc?
    Can I get the BT Sport App if I order BT Sport on Sky is what i'm basically asking haha
    Thanks for reading, would love to sort this out before the UFC on Saturday! 

    thanks alot for the reply I just found this deep within the BT website asked on live chat and she said that the App is included with all subscriptions to BT Sport! So happy! 

  • I'm trying to up grade the os but I keep getting the startup disk is full I ordered more memory I was told this will not help. What do I do?

    I'm trying to up grade the os but I keep getting the startup disk is full I ordered more memory I was told this will not help. What do I do?

    I think as drive capacities increase, the old 10-15% becomes less accurate.  The amount of free space you need doesn't really have anything to do with the drive size.  So, increasing your drive size shouldn't mean that you need to have more free GB (which using a % of drive space would mean).  You need free space to accommodate page outs (the amount of which would depend on how much RAM you have installed and how memory intensive the applications are), sleep images (again, this would max out at your total amount of RAM), and a bit to minimize fragmentation.
    With desktop drives commonly in the 2TB range today, it is certainly not necessary to have 200GB+ free in order to maintain proper operation.  I generally find about 30GB to be the minimum I'm comfortable with.  Mind you, I pretty much always have way more than that available.  But, if I'm working on a system and the amount of free space is at least 30GB, I would generally not site drive space as the cause of any performance issues.  I'd say that 30GB is a minimum for a stable system (with 8GB or RAM installed).  Of course at that amount, you would still need to free up space if you were to want to install or download any significant amount of data.
    With servers being more likely to run into the 16GB of RAM range, more storage would be necessary.  Most servers should be well stocked with storage, but the actual needs would vary greatly depending on what's being "served".
    The 10-15% thing came about when we used to talk about drive capacities in hundreds of MBs and RAM in terms of KB (not MB and certainly not GB).  More drive space is always a good thing, but as drive capacities continue to sky rocket, we don't need to dedicate larger amounts of storage on systems with the same specifications.  A set amount of space is required for proper operation regardless of the capacity of the drive installed.

  • Can I use the customer requirement number as sales order in 'Goods issue MB

    Can I use the customer requirement number as sales order in 'Goods issue MB1A'?
    Thanks,
    Tiger

    Why I used the customer requirement in MB1A as the sales order, Update was terminated.
    Thanks,
    Tiger

  • ASCP: How do I get the list of 1st level planned orders using msc_full_pegging table

    How do I get the list of 1st level planned orders using msc_full_pegging table, is any one having the script.

    Do you mean supply_type? If so, yes it will be in pegging table as supply_type or otherwise you can join this table with msc_supplies by joining transaction_id column and get the order_type from that which will be the supply type.
    Thanks,
    Abhishek Sharma
    P.S:- Try opening the discussion in a separate window and see if you get the option to mark it correct or helpful,

  • Get the last spool number created

    Hi,
    I need to get the last spool number that the system has assigned to an output ABAP list.
    I know that the SO_SPOOL_READ function give the information I want but I do not find the way to obtain the code. I thought that this function is an internal function of SAP, but it does not exist.
    Could anyone facilitate that code?
    Do anyone know other way to obtain that last spool number?
    Thank you very much for your time

    Thanks Ram,
    Your instructons were just what I needed.
    Finally, I use the sy-uname restriction to select the last spool number created for the user:
    DATA: BEGIN OF it     OCCURS 0,
            RQIDENT   LIKE TSP01-RQIDENT,
            RQCRETIME LIKE TSP01-RQCRETIME,
        END OF it.
    SELECT * FROM TSP01
        APPENDING CORRESPONDING FIELDS OF TABLE it
          WHERE
            RQOWNER = SY-UNAME           
          ORDER BY RQCRETIME DESCENDING.
      LOOP AT it.
        spool_num = it-rqident.          
        EXIT.
      ENDLOOP.
    Thanks a lot.

  • Getting the last active number purchasing info record

    Hi,
    I was trying to get the last active number of the purchasing info record.
    As in the ME21N, while creating a purchase order, once we have entered the material number, the system automatically returns the adequate number of the info recored, but I could't identify (through debug) which was the function module or method call used to get it.
    I will be really thankful if somebody could help.
    Thanks & regards.

    Thanks to all for your answers. I finally figured it out with the help of a functional consultant.
    To identify the last active number purchasing info record, we retreive from table EINA, and there, the field LOEKZ should be empty.
    Basically, we only have one info record number per couple material/vendor.
    Ragards

  • How to get the Next free Number for External Number Range

    Hi ,
    To get next free number for External Number Range, I have used NUMBER_GET_NEXT Function module.
    It is throws the exception like  NUMBER_RANGE_NOT_INTERN.
    How can i get the next free number for external number range object. And How to update the Current Number for External Number Range Object
    Scenario.
    Call Function module              NUMBER_GET_NEXT
    Import Parameter.
    NR_RANGE_NR : 02
    OBJECT            : RV_BELEG
    QUANTITY         : 00000000000000000001
    I am getting Exception : NUMBER_RANGE_NOT_INTERN
    Thanks in advance.
    Regards
    Ram

    Hi Anand,
    The SAP system issues the numbers for internal number range intervals automatically. This number is between the from-number and the to-number. The last number issued is logged in the current number level.
    You need to enter a number for external number issue. The number you enter needs to be between the from-number and the to-number. For external number ranges, the number number used is not logged. So the next available number is not possible in a straight forward way.
    Only for Internal number ranges, the FM NUMBER_GET_NEXT can get the next available number.
    Hope this helps.
    Thanks,
    Balaji

  • Capturing Release order number in Sales Order

    Hi SD experts,
    My client is into sugar industry.. so sugar is an essential product... so government will issue the release order quantity... for example... monthly 1000000 kgs and say the release order number is 9999 . my  requirement is i want to capture the release order number in the Sales Order.
    Thanks in advance...

    Hi Jayanth,
    you can use the user-exit USEREXIT_MOVE_FIELD_TO_VBAK (present in include MV45AFZZ ) to add new field say "Release Order No. " .
    Then, define a Z Table with fields Sales Order Number and Release Order No.
    Use user-exit USEREXIT_READ_DOCUMENT
    to read the  field "Release Order No. "   into Z Table.
    Use USEREXIT_SAVE_DOCUMENT to save the Release Order No. "   into Z Table.
    Just ask your ABAPer  and let him/her take an analysis.
    Test it into your TEST Client or system.
    Hope it helps you.
    Reward Points if found useful.
    Regards,
    Gaurav Raghav.

  • Need to query the database to get the last sequence number

    Hi all
    I am trying to get the last sequence number of the last row inserted into my Oracle database. Please could someone give me the SQL which would allow me to do this - using Oracle SQL Explorer I have confirmed that there is a sequence on the table which is called: XYZ_SEQ and the code for this is:
    CREATE SEQUENCE "MY_USER_NAME"."XYZ_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER NOCYCLE ;
    My Java application is inserting a row into my table and to insert a new row I need to have the last sequence inserted +1 so the new row can be added.
    Any help would be much appreciated.

    Hi,
    Welcome to the forum!
    If you are using a sequence just do (example):
    INSERT INTO TABLE_NAME
       (COL1,
        COL2)
    VALUES
       (SEQUENCE_NAME.NEXTVAL,
        OTHER_VALUE);to obtain (and use) the next number in the sequence when you are inserting.
    If you have a sequence to use for a specific table, you should use it when your insert new data (no matter your are doing that: java application, procedure, etc). Doing this you avoid some problems when you have the sequence 'out of date' about the associated data.
    Regards,
    Edited by: Walter Fernández on Sep 19, 2009 10:08 AM
    Edited by: Walter Fernández on Sep 19, 2009 10:10 AM

  • How do I go about getting the product serial number to register my product as well as install my product.  I bought it with a product box.  On the software disc sleeve, there is a series of numbers pasted at the bottom of the sleeves but this is not valid

    How do I go about getting the product serial number to register my product as well as install my product.  I bought it with a product box.  On the software disc sleeve, there is a series of numbers pasted at the bottom of the sleeves but this is not valid.  When I tried to type this in for registration, it does register as this numbers also contain letters in it.  Apparently the registration boxes accept numbers only.  What do I do with a useless product for which I have paid good money for it?????

    This is the simple solution which was offered to me when I tried to get the serial code on line.
    The box and disc sleeve do not contain a series with 24 numbers which I presume is the product code to install.
    I tried to redeem the registration code by following what they recommended, but inevitably it gets to the page that showed the registration boxes that need 24 serial numbers and I got stuck again.
    This product is so different what my previous experiences of other software products where I just enter the serial number straight from the disc sleeve and then I got registered and go on to use the software.
    I is really frustrating, spending the last two hours trying to get my product going....

  • How to get the current month number

    Hi everyone,
    Does anybody know how to get the current month number in Oracle Discoverer Worksheet calculation?
    I try to use EUL_DATE_TRUNC(CURRENT_DATE, 'MM'), but instead I got 01-AUG-00.
    If I change the data display format to MM, it will give me "08" but if I use TO_NUMBER function to convert it to number I get error "invalid number"
    Is there anyway to get the current month value in number? Thanks

    Scott,
    Thank you so much! It works perfectly! :)
    Hope you have a great day ahead!
    Cheers,
    Angeline

  • How to get the unoccupied material number in a number range

    How to get the unoccupied material number in a number range.for example, I wang to get a number between 1500000 and 1599990 which is unoccupied as my material number to be created. Is ther any FM or codes?

    Dear,
    You can get this information from Tcode SNUM or you can access database table NRIV.

Maybe you are looking for