How to obtain the IDOC number after creation

Hello everyone,
for our master data distribution via report RHALEINI (triggered via a custom report), we have some additional code in BAdI HRALE00OUTBOUND_IDOC, method IDOC_DATA_FOR_RECEIVER_MODIFY.
Everything is working fine so far. Now I need to know the Idoc number after it was created to store it in a customer table together with some additional data. Since the Idoc was not yet created when we're in the method mentioned above, I have to put my coding somewhere else.
Any that's exactly my question: Were could I put my coding? It needs to be executed after MASTER_DATA_DISTRIBUTE since this function creates the idoc in the database.
I though about the following:
- Since RHALEINI is called by a custom report, I might be able to read the idoc number from memory id COMM_HRMD_A (see RHALEINI, line 418).
- Maybe BAdI IDOC_DATA_INSERT could be used for this purpose?
What would be your approach for this?
Thank you in advance.

Hello Markus,
EXPORT comm_control TO MEMORY ID 'COMM_HRMD_A'.
This is a nice observation!
Since RHALEINI is called by a custom report, I might be able to read the idoc number from memory id COMM_HRMD_A
Are you SUBMIT'ting the report RHALEINI in the custom program? If yes, you can access the memory COMM_HRMD_A in your program. To verify this you can check in debug mode if the memory id is populated.
I've checked the report RHALEINI & the internal table comm_control should contain the idoc number!
Maybe BAdI IDOC_DATA_INSERT could be used for this purpose
Only if the previous approach doesn't work out. Remember [K.I.S.S|http://en.wikipedia.org/wiki/KISS_principle]
BR,
Suhas

Similar Messages

  • TS1702 how to find the serial number, after purchase Pages online?

    how to find the serial number, after purchase Pages online?

    If you downloaded the standalone trial version of Lightroom, it will be necessary for you to uninstall that version. Then you will be able to install Lightroom through the creative cloud application manager. After you install Lightroom that way, just double-click on the catalog that you have already started.

  • How to retrieve the vendor number during creation of Purchase Order?

    Dear SAP experts,
    For our Purchase Orders, during PO creation (t-code ME21 or ME21N) we want to achieve the following:-
    1) default the delivery address to our plant A address if the vendor is local and
    2) default the delivery address to our plant B address if the vendor is foreign.
    At the moment, we are trying to use the user exit enhancement "MMDA0001" to achieve the above.
    The problem is how to retrieve the vendor number from the screen so we could pass the vendor number to ZXM06U32 to check the ktokk field in LFA1 table in the whether the vendor is foreign or local.
    Thank you in advance.
    Regards,
    Alex

    u can do one thing, create 2 partner function, like 1 for local, and second for import vendor.
    or make 2 batch  n activate vendor batch and make mandatory field from SPRO. 
    then goto SHD0, and do one by one step. first time take 1st requirement and second time take second . like that make two variant .
    i dont know how much it will be helpful. bt i want to suggest smth like that only.
    or, go for ABAPER help
    thanks
    nisha

  • How to use the Idoc number.(generated by prgram) and ALE

    Hi All
    I have a problem to use Idocs. I go thru the following steps but can not able to see the final output.
    1.Create Segment ( WE31)
    2.Create Idoc Type ( WE30 )
    3.Create Message Type ( WE81 )
    4.Assign Idoc Type to Message Type ( WE82 )
    5.Make a report which gives us Idoc number.
    Now my problem is where this Idoc number can we used .and how to relate this with ALE.
    Regards
    Manoj

    Hi Manoj,
    Use transaction code we02 or we05 to get the idoc no.
    The table used are
    EDIDC - Control record
    EDID4 - Data record
    EDIDS - Status record
    Regards
    Arun

  • Getting IDoc Number after posting it frm Java Program

    Hi All:
    I had written a Java Program to post an IDoc into the SAP System. I was successful in posting an IDoc. My next step is, to get the Idoc number generated by SAP system for the posted IDoc. Using this IDoc number i want to track its status.
    Can anyone please let me know how to get the IDoc Number from SAP from a Java program? I have Transaction ID with me, can i get IDoc Number via Transaction ID?
    Please let me know ur views on this.
    Thanks & Best Regard,
    - - Rajiv

    Hi Rajiv,
       Could you Please help to clear one thing .I am very new to SAP JCO Programming.To remove the dependency of Posting Data to SAP through RFC program which is written by SAP People ,I want to use IDoc,is it possible to use it ? if yes could u please help with Some Java code so i can post Data through Java Code to SAP with IDoc.
    Wait for Your Kind Reply.
    Thanks & Warm regards,
    Kamal

  • How to find Outbound Idoc number from inbound Idoc number.

    Hi,
    I have one inbound Idoc in my system, then
    How to find the  idoc number from the system which sends that idoc(Outbound Idoc number).

    Hello
    You can use fm SREL_GET_NEXT_NEIGHBORS for this purpose.
    Scenario: An EDI purchase order is received by SAP-XI and forwarded as Inbound ORDERS IDoc to R/3. SAP-XI generates an (outbound) IDoc number which differs from the (inbound) ORDERS05 IDoc in the R/3 system.
    Calling fm SREL_GET_NEXT_NEIGHBORS with the following parameters:
    OBJECT-OBJKEY = <IDoc number, 16-digits>
    OBJECT-OBJTYPE = 'IDOC'
    MAX_HOPS = '99'            " <<< get all links
    I get the following result:
    0000000000133906                                   IDOC       CUSTOMER   OUTIDOC
    0000000000407402                                   IDOC                  INIDOC
    000000370383                                       BUS2012    CUSTOMER   OUTBELEG
    0010057944                                         BUS2032               INBELEG
    Outbound IDoc number
    Inbound IDoc number (ORDERS05)
    PO number
    Sales order (created from inbound ORDERS IDoc)
    Regards
      Uwe

  • How can we find the Idoc number which posts the material document in SAP

    Hi All,
    How can we find the Idoc number which posts the material document in SAP. We could not able to find the IDOC number from the material document which was posted by Idoc.
    Thanks
    Chandru

    Hi,
    In MIGO you can go to service of object(Just above show overview) and check 5th option workflow you will find the idoc number.
    regards
    suresh

  • Hi,  I lost my serial number for PS Elements11 following computer crash. Os is W7. I have the cd installation disc but there is no serial number with it or in the envelope  ..  How can I obtain the serial number please?     Thanks

    I lost my seriel number for PS Elements 11 following computer crash. Os is W7
    Peter Jones Aug 27, 2014 5:36 AM   
    Hi,
    I lost my serial number for PS Elements 11 following computer crash. Os is W7. I have the cd installation disc but there is no serial number with it or in the envelope
    How can I obtain the serial number please?
    Thanks

    If you registered the software you should be able to find the serial number thru your Adobe account online.
    To locate the serial number:
    http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • How to split the IDOCS based on document number change whit out BPM

    Hi all,
    Thanks,for giving the responce..
    Scenario:File to IDoc.
    Problum1 : How to Split the IDocs based on document number change in the source file with out BPM.My file contains document numbers like
    20000092
    20000092
    20000092
    50000050
    50000050
    50000065
    I want 3 IDocs in target system.i.e 1 for 20000092,20000092,20000092
                                                       2 for 50000050,50000050
                                                       3 for 5000006
    By using external definations i am getting 6 IDOCs insted of 3.
    Problum 2:Is there any chnges/modifications in Directory when we are using external definations.
    Could u plz provide me the step by step process(Repository/Directory) with using of external definations.
    Thanks in advance.
    Regards,
    KP

    HI,
    for this no need of BPM.
    You can think of Idoc bundling concept to acheive this-just you need to do the external definition to change the idoc occurence
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    to achieve for each document no, one idoc, you can write small user defined function in the mapping with context handling you an achieve this.
    For this e.g
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6bd6f69a-0701-0010-a88b-adbb6ee89b34
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
    Regards,
    Moorthy

  • How do obtain the number words typed in a Pages document?

    How do obtain the number words typed in a Pages document?

    I found it!  To get the number of words in my Pages 5.1 document...I clicked on the paper-icon on the far left...(at the very left edge) it gave me a selection that ended with "count words."  TaDa!  Thanks

  • How to find out the Idoc number triggered for any material transfer frm SAP

    Hi Folks,
    Can any body let me know How to find out the Idoc number triggered for any material transfer frm SAP?
    Do we have any navigation for that in MM03?
    Thanks,
    SPMD.

    Hi Shabbirmdpasha,
    If you know the user name then you can find the idoc numbers created by that user. But the problem here is it not only gives the material it gives all the idocs created by that user. Go to SE16 --> table name EDIDS --> here you can fill the approximate date and in UNAME give the userid and execute. This will give all the idocs created by that user. I know it is only a partial solution.
    Also would suggest to post the same in abap forums for more answers:
    ABAP Development
    Regards,
    ---Satish

  • How to find out the IDOC number(urgent)

    hello every one,
    i had recived all the data to BW from R/3 but the request is still running in the system
    for this <b>i need to manually release the IDOC for BD87</b>
    can any one please help me <b>How to find out the Idoc Number in R/3 and In BW for the particular load</b>
    Regards
    Sandy

    hi Siva,
    thanks for ur valuable answer,
    it is showing IDoc num for the succeeded one....
    my present error is Data pack 1 got error and Datapack 2 was success,
    their 3IDocs are their in detail tab all are success
    as per my knowledge it will for the Data pack 2 and it is showing 3different
    how can i find the Idoc which was struck .....
    that need to process manually in BD87..
    please suggest if i am wrong
    Regards
    Sandy

  • How do I obtain the next number for a Primary Key using an ADF View Object?

    I have two separate View Objects (A & B) for the same Entity Object. View Object A does a SELECT on all of the fields in the table. This View Object is where I execute my adds and updates. View Object B is only used to retrieve the next number for the primary key. This is done so that when I add a row to the database, I always get the max number of the primary key and add one to it. I accomplished this by setting the SQL mode to Expert and using the SQL: "SELECT MAX(NBR) AS MAX_NUMBER FROM TABLE_1". This may be overkill having a seperate View Object for this, but so far this is the only way I have found to obtain the next number. However, I have discovered that this way does not always work.
    The problem I'm running into is when I try to add multiple records to View Object A without committing the transaction between each add. Because View Object B is disconnected from View Object A, the MAX_NUMBER of View Object B comes back with the same number for each add I do on View Object A. So I know I must retrieve the MAX_NUMBER from View Object A.
    I've tried using the following code in my Table1ViewImpl class:
    this.setQuery("SELECT MAX(Table1.NBR) AS MAX_NUMBER FROM TABLE_1 Table1");
    this.executeQuery();
    The view object now has what I want, but I have yet to figure a way to extract the MAX_NUMBER out of the View Object. I've also looked into using the method addDynamicAttribute() but I can't figure out any way to set the attribute with the MAX_NUMBER.
    I can't be the only one trying to retrieve the next number from a database table using ADF. Can anyone help me with this? FYI - I'm using JDev 10.1.3 EA.

    You missing the point.
    On a multi-user db knowing the next highest number doesn't guarantee the number will be available when it comes time to commit the record. You can prove this to yourself by opening two instances of your app and do whatever you do to add a new record to your VO. Both will assume the same number, and when you commit an error will be generated
    You must use sequences to avoid the possibility of duplicate keys. If you are trying to avoid gaps in your numbering then you need to convince yourself why this is necessary.

  • How can I get the SERIAL NUMBER after an INSERT

    I am working on an application using Jdk1.2 connecting to an Oracle 8i
    Database. The JDBC driver that I am using is Oracle's thin driver.
    In the DB, I have a table that has a primary key as a sequence number.
    Upon inserting a single row into this table, how can I get this serial
    number that is generated by the Database.
    Previously I was using INFORMIX database and welogic's JDBC drivers and this
    is how I get the serial number.
    PreparedStatement ps = ...
    ps.setObject(......);
    ps.executeUpdate();
    int snumber =
    (weblogic.jdbc.informix4.Statement) ps.getSerialNumer()
    Similarly I have tried to use
    (oracle.jdbc.driver.OracleStatement) ps.getSerialNumber()
    But this method does not exist in the JDBC thin drivers.
    Is there some other way to get this serial number.
    Thanks,
    Suresh
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by syalaman:
    I am working on an application using Jdk1.2 connecting to an Oracle 8i
    Database. The JDBC driver that I am using is Oracle's thin driver.
    In the DB, I have a table that has a primary key as a sequence number.
    Upon inserting a single row into this table, how can I get this serial
    number that is generated by the Database.
    Previously I was using INFORMIX database and welogic's JDBC drivers and this
    is how I get the serial number.
    PreparedStatement ps = ...
    ps.setObject(......);
    ps.executeUpdate();
    int snumber =
    (weblogic.jdbc.informix4.Statement) ps.getSerialNumer()
    Similarly I have tried to use
    (oracle.jdbc.driver.OracleStatement) ps.getSerialNumber()
    But this method does not exist in the JDBC thin drivers.
    Is there some other way to get this serial number.
    Thanks,
    Suresh
    <HR></BLOCKQUOTE>
    ========================================
    ORACLE don't support serial number as Informix, but you can create sequence table
    and every time get the next value from this table.
    null

  • How to get the return message after running BD20 tranaction ?

    Hi Gurus,
    My requirement is to Post vendor invoice through ALE/IDOC ( Inbound IDOC ).
    - For that I had generated the IDOC using  Function module 'IDOC_INBOUND_WRITE_TO_DB '
    - Then I had processed that generated IDOC by calling the standard program rbdapp01(BD20-Tranaction ) using the below statment
    SUBMIT rbdapp01 WITH SELECTION-TABLE lt_seltab .
    Could any one suggest me how to get the report output of standard program (rbdapp01) to an internal table so that I dispaly as an seperated report like Posted Document number with messages or Error message
    Suggest me any Function module or any other standard program to process the IDOC so that I can fulfill my requirement.
    Regards
    Paul

    Use can read the IDOC status after processing...
    Eg.
      SELECT * FROM edidc INTO TABLE t_idoc_control_tmp
          FOR ALL ENTRIES IN t_update WHERE docnum = t_update-docnum.
    and then add your own logic IF SY_SUBRC EQ 0.
    I hope this will help you.
    Regards,
    Amey

Maybe you are looking for

  • Odd file access issues OES 11 SP1

    Hello, We're running a VMWare ESXi 5.1 cluster. On that we have an OES 11 cluster managing groupwise/iprint/nss/dhcp/dns services. Over the summer we updated to SP1 on the OES side. This school year we have seen some odd issues, particularly with our

  • CLOB vs BLOB datatypes

    Which is the best datatype to use that will hold an input stream or byte stream, CLOB or BLOB? Thank you.

  • Sending IDoc to Logical System

    Hi All, Foremost thing before i post my query is that am an ABAP Developer. Now the Query is, we have scenario where in we need to send the Sales order/Delivery when it is created to a logical system( an external sytem ). I have created a new message

  • Which IDOC segments need to be filled for message type CRMXIF_ORDER_SAVE_M

    Hi , I am working on data migration to CRM7.0 system.I am using LSMW for creating ISU Contracts using CRMXIF_ORDER_SAVE_M message type and CRMXIF_ORDER_SAVE_M01 IDOC kindly help me in what all segments needs to be filled for creating ISU contract in

  • Design interface is very slow

    Hello, I'm using this beta on a Windows XP SP2 with 1Gb of memory and Intel Core 2 1.86Ghz cpu. The application I created is very basic: has only 2 buttons and nothing else. If I select both of them to drag them in the design view it is really slow.