Using ABAP memory during IDOC processing

What are implications , issues of using ABAP memory in IDOC processing i.e. let say in inbound FM , I create implicit enhancement and I submit a report and return  and pass data to this report via abap memory. What are implications ? Is it recommended to use this approach since many number of IDOCs are hitting the system and orders are getting posted.
Please suggest . Thanks in advance.

Hello Jürgen,
Thanks a lot for this OSS Note. So it seems the issue is some kind of a program error that requires source code correction. I am in process of getting this note applied in our SAP environment. Hopefully, it solves my problem. I will definitely keep you posted.
Thanks again for your quick help.
Regards,
EssKay

Similar Messages

  • How to use abap memory in global class

    Hi experts,
                     I want to  know how to use abap memory in global class. when i try write export and import statement its showing
    error is export statement does not support in object oriented concept.
    Thanks
    Ramesh Manoharan

    Hi Ramesh,
    Export and import statements were not allowed to use in  classes. Create a global variable in public section of that class of type of  export parameter.Then pass value to the global variable of class  by calling that class.
    by
    Prasad GVK.

  • Is there any issue in using ABAP Memory ID to exchange between the programs

    Hi All,
    Do we expect any issues if we use ABAP Memory ID's to exchange the data between different programs?
    I was told by my colleagues that, we can expect some unforeseen issues if we use ABAP Memory ID's. These issues could be because of refresh of Memory ID's in the Standard program.
    Is that true? Need experts opinion on this question.
    Thanks a lot in advance.
    Regards,
    RSS

    I can think of such case only if you pick memory id of some standard name. Anyhow I can't imagine this happens w/o running any standard report on you machine from your custom report. ABAP memory is user dependant so you have your own roll area wherein all run programs can communicate. If you don't run any standard report by means of SUBMIT, you don't have to worry about this aspect either.
    Futhermore if you run separate GUI session, or sinmply use /o in same session, you open new external session which gets its own new ABAP memory. So you don't affect your previous one at all.
    If you want to be extremely careful, use memory id of some custom, original name i.e. I always use such naming convention NAME_OF_PROGRAM_XXXX where XXX denotes its usage i.e. XXX = 'EMPLOYEES'. If I also don't use SUBMIT I am 100% sure no other program touches/flushes this memory.
    Don't believe your collegues and use ABAP memory whenever needed, but always consider context of program and where it lies in the memory. If they persist, please send them here to discuss this matter giving some good reason why they discourage you to do.
    BTW: This could be an issue with SAP Memory, but with ABAP no chance.
    Regards
    Marcin

  • How to pass data between two internal sessions using ABAP memory?

    Hi,
    How to pass data between two internal sessions using ABAP memory?
    It would be fine if you could explain with an example.
    And also let me clear about the data passing between two main sessions and two external sessions with specific examples.
    Thanks.

    Hi ,
      check the example.
    Reading Data Objects from Memory
    To read data objects from ABAP memory into an ABAP program, use the following statement:
    Syntax
    IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
    This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
    In this statement, the system does not check whether the structure of the object in memory is compatible with the structure into which you are reading it. The data is transported bit by bit. If the structures are incompatible, the data in the target field may be incorrect.
    PROGRAM SAPMZTS1.
    DATA TEXT1(10) VALUE 'Exporting'.
    DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    DO 5 TIMES.
      ITAB-BOOKID = 100 + SY-INDEX.
      APPEND ITAB.
    ENDDO.
    EXPORT TEXT1
           TEXT2 FROM 'Literal'
      TO MEMORY ID 'text'.
    EXPORT ITAB
      TO MEMORY ID 'table'.
    SUBMIT SAPMZTS2 AND RETURN.
    SUBMIT SAPMZTS3.
    The first part of this program is the same as the example in the section Saving Data Objects in Memory. In the example, the programs SAPMZTS1 and SAPMZTS2 are called using SUBMIT. You can create and maintain the programs called using the SUBMIT statement by double-clicking their names in the statement. For further information about the SUBMIT statement, refer to Calling Executable Programs (Reports)
    Example for SAPMZTS2:
    PROGRAM SAPMZTS2.
    DATA: TEXT1(10),
          TEXT3 LIKE TEXT1 VALUE 'Initial'.
    IMPORT TEXT3 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT3.
    IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT1.
    Example for SAPMZTS3:
    PROGRAM SAPMZTS3.
    DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
    LOOP AT JTAB.
      WRITE / JTAB-BOOKID.
    ENDLOOP.
    The output is displayed on two successive screens. It looks like this:
    and
    The program SAPMZTS2 attempts to read a data object TEXT3 from the data cluster "text", which does not exist. TEXT3 therefore remains unchanged. The existing data object TEXT2 is placed in TEXT1. In both cases, SY-SUBRC is 0, since the cluster "text" contains data.
    The program SAPMZTS3 reads the internal table ITAB from the cluster "table" into the internal table JTAB. Both tables have the same structure, namely that of the ABAP Dictionary table SBOOK.
    Pls. reward if useful.....

  • BOM mapping with change number error during IDoc process

    Hi all,
    i am creating BOM using IDoc BOMMAT04.i have checked this IDoc will use FM IDOC_INPUT_BOMMAT inside.
    in this function module, it is using FM CSAP_MAT_BOM_CREATE and CSAP_MAT_BOM_MAINTAIN to create and change.
    currently, creation and deletion is success. but when change, if the change number passed as an input parameter, the IDoc process error saying that the BOM header not allowed to update for read-only field.
    if i not pass the change number, the change will be success, but no change number displayed in the item. that is not the user expected.
    and if i delete the bom with change number, create a new BOM for the same material is not aloowed, saying that BOM already existing.
    it seems that CSAP_MAT_BOM_CREATE and CSAP_MAT_BOM_MAINTAIN cannot support much. it is limited.
    can anyone have any good solutions? thanks!

    yeah, for the change, i have solved it.
    but currently, if i delete the existing BOM with a change number, the re-creation is not allowed by the IDoc saying that the BOM already existing.
    if i delete in CS02 without change number, it deleted from DB and can be re-create.
    but if delete in IDoc without change number, it failed saying that local BOM can not be deleted by ALE.
    do you have any solution? i want to implment in IDoc: delete existing BOM and create a new one for the same material with change number. (currently the standard IDoc FM not support BOM group)

  • Config Check During IDOC Processing

    Hello experts:
    I am attempting to extend a material to a plant with IDOC.  I can get it to work, however I was bumping into required fields that I do not see, and are not altered to, being required when I enter values manually in SAP. 
    For example if extend data to the MRP2 tab manually, I am not told any fields are required and I can save with no problem.  When I extend with the IDOC, if says a field is required.  Once I provide it iin the IDoc it works. 
    Is there some kind of different IDoc cofig check that happen that are hidden when you enter data into SAP manually?
    Thanks all.

    I think I just solved this one actually.  At this point I think there is no special IDoc check.  The inbound IDoc process is checking config correctly.  Will post back soon if I am wrong.

  • Error During IDoc Processing

    Hi friends,
    i want to transfer data in between two systems.
    i have created my own message type = ZSACH
    Basic type  = ZSACH1
    segement = ZSACH
    model view = new_model
    when i am execuiting this IDOC by using the program i am getting the error as
    EDI: Syntax error in IDoc (segment cannot be identified)
    here i am giving the coding what i have write in my program
    parameters :p_logsys like tbdlst-logsys.
    data : gen_segment like edidd-segnam value 'ZSACH1'.
    data : control_dat like edidc,
           control_dat1 like edidd,
          gen_data like zsach .
    tables : zsach1.
    data: begin of inttab occurs 0,
            lname type zsach1-lname,
            fname type zsach1-fname,
          end of inttab.
    data :
          int_edidd like edidd occurs 0 with header line,
          int_edidc like edidc occurs 0 with header line.
    select * from zsach1 into corresponding fields of table inttab.
    if sy-subrc ne 0.
      message 'no data' type 'I'.
      exit.
    endif.
    control_dat-mestyp = 'ZSACH'.
    control_dat-idoctp = 'ZSACH1'.
    control_dat1-segnam = 'ZSACH'.
    control_dat-rcvprt = 'LS'.
    control_dat-rcvprn =  p_logsys.
    loop at inttab.
      gen_data-lname = inttab-lname.
      gen_data-fname = inttab-fname.
      int_edidd-segnam = gen_segment.
      int_edidd-sdata = gen_data.
      append int_edidd.
    endloop.
    call function 'MASTER_IDOC_DISTRIBUTE'
      exporting
        master_idoc_control                  = control_dat
    *   OBJ_TYPE                             = ''
    *   CHNUM                                = ''
      tables
        communication_idoc_control           = int_edidc
        master_idoc_data                     = int_edidd
    exceptions
       error_in_idoc_control                = 1
       error_writing_idoc_status            = 2
       error_in_idoc_data                   = 3
       sending_logical_system_unknown       = 4
       others                               = 5
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno.
    else.
      loop at int_edidc.
        write :/ 'IDOC GENERATED',int_edidc-docnum.
      endloop.
      commit work.
    endif.
    <Added code tags>
    can anyone give better solution for this error..
    i have searched in SDN but i can't get the better document
    thanks in advance.
    Regards,
    kk
    Moderator Message: Please use "code tags" to format your code.
    Edited by: Suhas Saha on Nov 9, 2011 12:59 PM

    Hello kk,
    It is very clear from the error message
    EDI: Syntax error in IDoc (segment cannot be identified)
    that there is some problem with the segment name.
    When i look at your code snippet i can see there is a mismatch in the segment names passed in the IDoc control rec & the data rec.
    control_dat1-segnam = 'ZSACH'.
    int_edidd-segnam = gen_segment. "gen_segment like edidd-segnam value 'ZSACH1'
    BR,
    Suhas
    PS: Before searching in SDN try to put-in some self-effort, saves time actually

  • Variable Substitution not working when using ABAP mapping

    Hi all,
    I am doing an IDoc to File scenario.
    Due to some complex mapping requirements, i had to use ABAP mapping for IDoc to File ( IDoc : SHPMNT05)
    There is also one more requirement where in i need to generate the receiver filename dynamically
    i.e the filename is of the form :     
        GW-XYZ-DD/MM/YYYY.csv
    Where
    XYZ is the Shipment number (E1EDT20- TKNUM)
    DD/MM/YYYY is the IDOC creation date in ECC (EDIDC-CREDAT)
    so i used the variable substitution option in receiver file adapter.
    But its not working.
    Is there any limitation for using the variable Substitution, doesnt variable substitution work in case of ABAP mapping?
    Regards,
    Loveena.

    Hi,
      u written ABAP mapping program to get the file name in the required format ,
    is it rt?
    when u test it at message mapping(including ABAP map program)
    u get the the required format of file name in the one of target filed.
    if that was fine, please check the variable substituiton parameters at receiver file adapter.
    i mean, are u maintain variable name and refernece.
    u have to specify the payload information.
    warm regards
    mahesh.

  • ABAP Memory (EXPORT/IMPORT) - Performance Issue

    Performance wise, is it a good idea to use ABAP memory to export and import data between programs?
    Thanks in advance,
    JT

    IMHO is you EXPORT/IMPORT a couple of variable...Your not going get any performance issues....So go ahead -:)
    Greetings,
    Blag.

  • ABAP memory performance issue

    Dear experts:
        I got a problem with ABAP memory performance issue. I need to export an internal table to ABAP memory, and it's ID is sales order number. So, I will bulid too many ABAP memory in SAP...
        Does it will couse performance issue or will it be lost?
    tyrolu

    Hi Tyrolu,
    There are some settings in basis which decides size of your abap memory.
    If you are consuming most of the abap memory by exporting heavy objects to abap memory then
    you may face a problem as many standard sap program aslo uses abap memory and
    if there is no free abap memory then they will start thowing short dumps like "Page allocation error"
    or "Could not allocate shared memory" or something like that, I don't remember exact term now.
    In some cases you won't have any problem if users are less, but as the no of concurrent users
    running your program increased then every user who runs the program would consume abap memory
    and if there is no free abap memory then this may again lead to above mentioned problem.
    Also ensure FREE MEMORY ID is used which clears abap memory immediatly.
    Other wise abap memory is cleared by the garbage collector on random basis and by that time
    your memory remains consumed and not available for other programs to use
    which may again lead to above mentioned problem.
    Regards,
    Vishal

  • Starting new database LUW inside ABAP during IDoc posting

    Hi all,
    During posting of an inbound IDoc, I am trying to update my Z-table in user-exit. I want to do it regardless of the result of IDoc posting. The problem is: if IDoc posted successfully - table is updated because COMMIT WORK is called at the end of the posting, however, if IDoc not posted - ROLLBACK WORK is called and table is not updated. So, my aim now is to commit the update of Z-table in any case, but it is the only thing that should be committed - no other prior update FMu2019s should be committed.
    I'm aware about the following thread
    http://forums.sdn.sap.com/thread.jspa?threadID=1884700
    Author of this thread says that he solved a problem by means of RFC and STARTING NEW TASK. But ABAP help says
    that starting asynchronous RFC triggers immediately a database commit in the calling program (which is unacceptable because all prior update FMu2019s will be committed ). I've checked and it is really the case.
    From my point of view SET UPDATE TASK LOCAL with COMMIT WORK should work in such kind of tasks, but in case of IDoc processing the whole process runs in a local update (see SET UPDATE TASK LOCAL in FM 'IDOC_INPUT'), so writing once again SET UPDATE TASK LOCAL has no effect.
    I tested SUBMIT statement as well. It had no effect and then I found out from ABAP help that SUBMIT ... AND RETURN starts new SAP LUW, but NOT a DB LUW. That is if I update my Z-table in the program called by SUBMIT - all ROLLBACK statements still affect my  Z-table update.
    Is there any simple solution? Please suggest.
    Thanks in advance!

    Hello,
    Try SUBMIT VIA JOB.....
    Sample Code
    call function 'JOB_OPEN'
    exporting
    jobname = name
    importing
    jobcount = number
    exceptions
    cant_create_job = 1
    invalid_job_data = 2
    jobname_missing = 3
    others = 4.
    if sy-subrc = 0.
    submit z_idoc_create_process_order and return
    via job name number number
    with p_aufnr = it_header1-aufnr
    with p_werks = it_header1-werks
    with p_autyp = c_autyp
    with p_auart = it_header1-auart
    with p_dispo = it_header1-dispo
    with p_opt = c_opt
    with p_mestyp = c_mestyp.
    if sy-subrc = 0.
    call function 'JOB_CLOSE'
    exporting
    jobcount = number
    jobname = name
    strtimmed = 'X'
    exceptions
    cant_start_immediate = 1
    invalid_startdate = 2
    jobname_missing = 3
    job_close_failed = 4
    job_nosteps = 5
    job_notex = 6
    lock_failed = 7
    others = 8.
    if sy-subrc 0.
    endif.

  • Essential Transfer Parameters Missing in record during Inbound IDOC process

    Dear Gurus
    We are creating a Inbound delivery in one system, we have made all the custom settings for IDOC processing for inbound and outbound idoc in both the systems. Upon the execution of inbound delivery, the system 
    During the Inound delivery processing, the outbound IDOC is successfully distributed. However in the receving system, the IDOC is not posted and it throws the below erroe\r
    Essential transfer parameters are missing in record: 0180000055 000010 / Mess number 561 and message type E
    We are using Outbound IDOC mess type DESADV basic type DELVRY01 process code DELV with FM IDOC_OUT PUT_DELVRY
    In the receiving system message type DESADV , process code DELS, and FM IDOC_INPUT_DESADV1
    What is that which is going wrong.
    Please help me out
    Thanks

    Hello
    To create inbound delivery from outbound delivery, use following setting -
    Outbound idoc -
    idoc type - DESADV01
    message type - DESADV
    Process code - SD05
    FM - IDOC_OUTPUT_DESADV01
    Inbound iDOC -
    Message Type - DESADV
    Process Code - DESA
    FM - IDOC_INPUT_DESADV
    Idoc Type - DESADV01

  • Idoc processing best practices - use of RBDAPP01 and RBDMANI2

    We are having performance problems in the processing of inbound idocs.  The message type is SHPCON, and transaction volume is very high.  I am a functional consultant, not an ABAP developer, but will try my best to explain our current setup.
    1)     We have a number of message variants for the inbound SHPCON message, almost all of which are set to trigger immediately upon receipt under the Processing by Function Module setting.
    2)      For messages that fail to process on the first try, we have a batch job running frequently using RBDMANI2.
    We are having some instances of the RBDMANI2 almost every day which get stuck running for a very long period of time.  We frequently have multiple SHPCON idocs coming in containing the same material number, and frequently have idocs fail because the material in the idoc has become locked.  Once the stuck batch job is cancelled and the job starts running again normally, the materials unlock and the failed idocs begin processing.  The variant for the RBDMANI2 batch job is currently set with a packet size of 1 and without parallel processing enabled.
    I am trying to determine the best practice for processing inbound idocs such as this for maximum performance in a very high volume system.  I know that RBDAPP01 processes idocs in status 64 and 66, and RBDMANI2 is used to reprocess idocs in all statuses.  I have been told that setting the messages to trigger immediately in WE20 can result in poor performance.  So I am wondering if the best practice is to:
    1)     Set messages in WE20 to Trigger by background program
    2)     Have a batch job running RBDAPP01 to process inbound idocs waiting in status 64
    3)     Have a periodic batch job running RBDMANI2 to try and clean up any failed messages that can be processed
    I would be grateful if somebody more knowledgeable than myself on this can confirm the best practice for this process and comment on the correct packet size in the program variant and whether or not parallel processing is desirable.  Because of the material locking issue, I felt that parallel processing was not desirable and may actually increase the material locking problem.  I would welcome any comments.
    This appeared to be the correct area for this discussion based upon other discussions.  If this is not the correct area for this discussion, then I would be grateful if the moderator could re-assign this discussion to the correct area (if possible) or let me know the best place to post it.  Thank you for your help.

    Hi Bob,
    Not sure if there is an official best practice, but the note 1333417 - Performance problems when processing IDocs immediately does state that for the high volume the immediate processing is not a good option.
    I'm hoping that for SHPCON there is no dependency in the IDoc processing (i.e. it's not important if they're processed in the same sequence or not), otherwise it'd add another complexity level.
    In the past for the high volume IDoc processing we scheduled a background job with RBDAPP01 (with parallel processing) and RBDMANIN as a second step in the same job to re-process the IDocs with errors due to locking issues. RBDMANI2 has a parallel processing option, but it was not needed in our case (actually we specifically wouldn't want to parallel-process the errors to avoid running into a lock issue again). In short, your steps 1-3 are correct but 2 and 3 should rather be in the same job.
    Also I believe we had a designated server for the background jobs, which helped with the resource availability.
    As a side note, you might want to confirm that the performance issues are caused only by the high volume. An ABAPer or a Basis admin should be able to run a performance trace. There might be an inefficiency in the process that could be adding to the performance issue as well.
    Hope this helps.

  • HT201210 I have error code -43 when trying to upgrade iPhone 3GS running v4.3 to version 5 or above. This error occurs whilst trying to back up phone during upgrade process. 2GB of free memory on phone. Can anyone help?

    I have error code -43 when trying to upgrade iPhone 3GS running v4.3 to version 5 or above. This error occurs whilst trying to back up phone during upgrade process. 2GB of free memory on phone. Can anyone help?

    Well I spoke too soon.
    The update was successful, but now I cannot connect to the 3GS data network.
    Cannot get email and cannot open a page in Safari.
    +"Safari could not open the page because the server stopped responding."+
    +"Cannot Get Mail+
    +THe mail server is not responding. Verify that you have entered the correct account info in Mail settings."+
    Email and internet work fine on WiFi.........no data using 3GS network.
    Looks like I will have to revert back to old OS.

  • Sales order IDOC process Using FM J_4A_IDOC_INPUT_ORDERS

    Hi ABAP gurus,
    i am working on Sales order creation using IDOC .
    while i am Filling idoc i am filling reference document number and
    item number .(VGBEL and VGPOS). but when i process idoc i am not getting reference document number at item level.  here we processed idoc using FM J_4A_IDOC_INPUT_ORDERS.
    Please suggest me which segment do i neeed to fill for getting reference document number at item level .right now i am using E1j3p02 segment.
    or do i need to implement user exit for this.
    thanks,
    Neo.

    Hi Shareen Hegde 
    To create Inbound...idoc
    Use the Function Module in you Program : IDOC_INBOUND_WRITE_TO_DB to create the Inbound idoc
    Pass the Control record and Data record in FM.....
    Use Message type : Orders
    IDoc type : Orders01 or 02 or 03 or 04 or 05 ....  which ever suite for your requirement....
    Process Code : ORDE
    When ever your custom program for creating the inbound sales order with  runs .....
    it call the internally FM IDOC_INPUT_ORDERS to create the Sales order...
    or
    If you are getting the inbound idoc from subsystem .....then check you partner profile ,Message type ed and Process code is correct or not....
    I hope this resolves your issuse..
    Ramesh

Maybe you are looking for

  • Vbscript, change page size

    So I have folder with numerous word/excel files that need to be converted to PDF on Legal Size "paper". We have the "Save As PDF" plugin for Office so converting the files to PDF is no problem, however, using that plugin you cannot specify a "Print S

  • Problem using swf loader

    When i try to run the mxml individually, It run correctly. As soon as i include it in another mxml using SWFLoader , the components stop working properly. It reflects the data sometime while sometime it doesnt. If i press browser refresh button , the

  • URL/DOMAIN NAME QUESTION

    Thinking of upgrading to iLife 6. When you create a webpage, can you create a clean URL, such as myname.com or does it have to be a part of another site such as apple.iweb/myname.com hope that makes sense. thanks

  • How to obtain items data in KOBED and KOBEV (Requirements)

    Hi, I'd like to obatain info about the item when releasing PO through ME29N. I am using a custom requirement to do that. I need to check if the item is marked as a Return (MEPO1211-RETPO) and if so I do not want to send an output message (email). Tha

  • PO report with Netprice+Tax value

    Dear All, Is there any report available  with Netprice+Tax value? Rgeards