Inbound - IDoc problem

Hi Friends,
Can anybody help me . I am facing a problem in IDOC inbound processing.
My scenario in SALES PER RECEIPT - POS like this: I have to read XML (From PC) file and i have to post it.
I am using Idoc - WPUBON01. After reading XML file i used Function module to distribute - MASTER_IDOC_DSTRIBUTE.
In we02 i checked Idoc is generating but status showing 29.
So run the report RSEOUT00. But i am getting message like 'No idoc is selected for processing'.
Plz help me what i have to do. I created port also.
Regards,
P. Kumar.

Hi,
sarath has told valid point..don't use master_idoc_distribute,instead use the bapi
bapi_idoc_input1..
plz check the sample code how to do with inbound idoc,as u have got the data ,u just need to call the bapi and post it..
check the code and proceed..
FUNCTION zdtsint052f_gpoms_to_sap_gm.
""Local interface:
*"  IMPORTING
*"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
*"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
*"  EXPORTING
*"     VALUE(WORKFLOW_RESULT) LIKE  BDWF_PARAM-RESULT
*"     VALUE(APPLICATION_VARIABLE) LIKE  BDWF_PARAM-APPL_VAR
*"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
*"     VALUE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS
*"  TABLES
*"      IDOC_CONTRL STRUCTURE  EDIDC
*"      IDOC_DATA STRUCTURE  EDIDD
*"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
*"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
*"      SERIALIZATION_INFO STRUCTURE  BDI_SER
*"  EXCEPTIONS
*"      WRONG_FUNCTION_CALLED
Purpose            :On recording the material consumption from       *
                    manufacturing tickets in GPOMS system, GPOMS     *
                    will report the data to the SAP system.Based     *
                    on this message, goods issue to the process order*
                    will be posted in SAP. This interface will       *
                    used for storage location managed materials      *
                    in SAP.                                          *
Program Logic      :Loop at the data records of IDOC and to get the  *
                    Order number and SAP Movement type               *
                    If the Material document already exists for this *
                    Order number and Movement type then give error   *
                    else call standard FM 'BAPI_IDOC_INPUT1' to      *
                    Material Documents in SAP.                       *
Declaration of Constants                                             *
  CONSTANTS :lc_item_create(25) TYPE c VALUE 'E1BP2017_GM_ITEM_CREATE',
             lc_mbgmcr(6)       TYPE c VALUE 'MBGMCR'.
Declaration of Variables                                             *
  DATA : lv_index TYPE sytabix,
         lv_retcode type sy-subrc.
Declaration of Workareas                                             *
  DATA: lwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create,
        lwa_data         TYPE edidd, " Work area for IDOC
        lwa_control      TYPE edidc. " Work Area for control rec
Read the control data information of idoc.
  loop at idoc_contrl INTO lwa_control Where mestyp = lc_mbgmcr.
Extract the data from the segments.
    LOOP AT idoc_data INTO lwa_data
    WHERE docnum = lwa_control-docnum and
          segnam = lc_item_create.
*->> Set the tabix of the internal table
      lv_index = sy-tabix.
Move the Material Document Item Segment data
      MOVE lwa_data-sdata TO lwa_e1bp2017_gm_item_create.
Modify the material document item data  internal table
      PERFORM sub_modify_idocdata changing lwa_e1bp2017_gm_item_create.
*->> set the changed values to the IDOC SDATA
      MOVE  lwa_e1bp2017_gm_item_create TO lwa_data-sdata.
*->> Modify the table
      MODIFY idoc_data FROM lwa_data index lv_index.
Clear the Work areas
      CLEAR : lwa_data,
              lwa_e1bp2017_gm_item_create.
    ENDLOOP.                                     "LOOP AT t_idoc_data
Call the BAPI function module to create the
appropriate Material Document
    CALL FUNCTION 'BAPI_IDOC_INPUT1'
      EXPORTING
        input_method          = input_method
        mass_processing       = mass_processing
      IMPORTING
        workflow_result       = workflow_result
        application_variable  = application_variable
        in_update_task        = in_update_task
        call_transaction_done = call_transaction_done
      TABLES
        idoc_contrl           = idoc_contrl
        idoc_data             = idoc_data
        idoc_status           = idoc_status
        return_variables      = return_variables
        serialization_info    = serialization_info
      EXCEPTIONS
        wrong_function_called = 1
        OTHERS                = 2.
    IF sy-subrc = 1.
      RAISE wrong_function_called.
    ENDIF.
  endloop.
ENDFUNCTION.
***INCLUDE LZDTSINT052F_GPOMS_GMF01 .
*&      Form  sub_modify_idocdata
Modify the material document item data  internal table
FORM sub_modify_idocdata
CHANGING pwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create.
contant declaration
  CONSTANTS: lc_261(3) TYPE c VALUE '261'.
  DATA : lv_aplzl LIKE resb-aplzl,
         lv_aufpl LIKE resb-aufpl,
         lv_subrc LIKE sy-subrc,
         lv_charg LIKE resb-charg,
         lv_uom LIKE pwa_e1bp2017_gm_item_create-entry_uom.
  CLEAR: pwa_e1bp2017_gm_item_create-reserv_no,
         pwa_e1bp2017_gm_item_create-res_item.
*->> Get SAP storage bin & Storage type from the Z table
  SELECT lgtyp lgpla
    INTO (pwa_e1bp2017_gm_item_create-stge_type,
          pwa_e1bp2017_gm_item_create-stge_bin)
     UP TO 1 ROWS
    FROM zdtsint050_sttyp
     WHERE zstorage_typ = pwa_e1bp2017_gm_item_create-stge_type
      AND  zstorage_bin = pwa_e1bp2017_gm_item_create-stge_bin.
  ENDSELECT.
  IF sy-subrc NE 0.
    CLEAR: pwa_e1bp2017_gm_item_create-stge_type,
           pwa_e1bp2017_gm_item_create-stge_bin.
  ENDIF.
  PERFORM get_oper CHANGING pwa_e1bp2017_gm_item_create.
Get the Reservation number and Reservation item number
basing on the idoc data.
  SELECT rspos werks lgort
         INTO (pwa_e1bp2017_gm_item_create-res_item,
              pwa_e1bp2017_gm_item_create-plant,
                 pwa_e1bp2017_gm_item_create-stge_loc)
         FROM resb
         UP TO 1 ROWS
         WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
         AND   matnr = pwa_e1bp2017_gm_item_create-material
         AND   charg = pwa_e1bp2017_gm_item_create-batch
         AND   aufnr = pwa_e1bp2017_gm_item_create-orderid
         AND   vornr = pwa_e1bp2017_gm_item_create-activity
         AND   bwart = lc_261.
  ENDSELECT.
  IF sy-subrc <> 0.
Start of insertion for R31K993797
    CLEAR lv_charg.
    SELECT rspos werks lgort
         INTO (pwa_e1bp2017_gm_item_create-res_item,
              pwa_e1bp2017_gm_item_create-plant,
                 pwa_e1bp2017_gm_item_create-stge_loc)
         FROM resb
         UP TO 1 ROWS
         WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
         AND   matnr = pwa_e1bp2017_gm_item_create-material
         AND   charg = lv_charg
         AND   aufnr = pwa_e1bp2017_gm_item_create-orderid
         AND   vornr = pwa_e1bp2017_gm_item_create-activity
         AND   ( splkz = 'X' or
                 splkz = space )
         AND   bwart = lc_261.
    ENDSELECT.
    IF sy-subrc <> 0.
End of insertion for R31K993797
      SELECT SINGLE werks lgort
            INTO (pwa_e1bp2017_gm_item_create-plant,
                   pwa_e1bp2017_gm_item_create-stge_loc)
            FROM resb
            WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no.
      CLEAR : pwa_e1bp2017_gm_item_create-reserv_no,
              pwa_e1bp2017_gm_item_create-res_item.
    ENDIF.
  ENDIF.
get SAP UOM
  SELECT SINGLE zsap_uom
                INTO lv_uom
                FROM zca_uom_conv
                WHERE zext_uom = pwa_e1bp2017_gm_item_create-entry_uom.
  IF sy-subrc = 0.
    pwa_e1bp2017_gm_item_create-entry_uom = lv_uom.
  ENDIF.
ENDFORM.                    " sub_modify_idocdata
*&      Form  get_oper
     Get the operation
     <--P_PWA_E1BP2017_GM_ITEM_CREATE_RE  Segment
FORM get_oper  CHANGING p_pwa_e1bp2017_gm_item_create TYPE
               e1bp2017_gm_item_create.
  DATA : l_aufpl LIKE afko-aufpl,
         l_aplzl LIKE afvc-aplzl.
  REFRESH : i_op.
  UNPACK p_pwa_e1bp2017_gm_item_create-orderid TO
         p_pwa_e1bp2017_gm_item_create-orderid.
Get the reservation and routing number for the order
  SELECT SINGLE
         rsnum
         aufpl
         FROM afko
         INTO (p_pwa_e1bp2017_gm_item_create-reserv_no,
               l_aufpl)
         WHERE aufnr = p_pwa_e1bp2017_gm_item_create-orderid.
  IF sy-subrc = 0.
    CALL FUNCTION 'CONVERSION_EXIT_NUMCV_INPUT'
      EXPORTING
        input  = p_pwa_e1bp2017_gm_item_create-activity
      IMPORTING
        output = p_pwa_e1bp2017_gm_item_create-activity.
  ENDIF.
ENDFORM.                    " get_oper
i have modifeid the incoming data,in ur case its not needed ,only first few lines until the bapi u have to see..if u have any query let me know..
Regards,
Nagaraj

Similar Messages

  • Add segment to inbound idoc problem

    Hi ,
    I want to insert a segment in the middle of the segements inside a inbound idoc processing module.The problem is
    i am able to pass the segmnet name and data but i don't now what should be populated to the segment number (SEGNUM). Its value is coming as the same value of the previous segment when i checked in debugging mode.Can any body tell me how to populate the segnum field.
    Regards,
    Soumya.

    Have you tried by just keeping it blank.I will work fine if the hierarchy is kept correctly.

  • EDI Inbound Idoc problem

    Hi,
    We are facing an issue with Inbound IDoc.
    We have a PO inbound idoc which is in status '53' but the PO document did not get created.
    Can you please help us if anyone faced similar issue.
    Thanks,
    Anil

    Hello,
    sounds strange.
    1. check the status record of 53 Idocs you should find a message like:  Standard oder nnnnnnnnnn has been saved.
    2. If order number nnnnnnnnnnn does not exists  check transaction SM13, ST22 for errors.
    3. for testing change inbound options in WE20 to <trigger by background programm>  and book the idoc in forground.

  • Problem in Inbound Idoc

    Hi friends,
    I have a small problem, actually one of my inbound idoc successfuly processed. But there is one field called IBAN, its for vendor master bank details.  its not populated in SAP. But the segment having the value. Its giving problem for one particular vendor.  So how to find why its not populated in SAP? Where we need check. Because IDOC having proper values, one of field value only not populated in sap. Pls help this issue.
    Mohana

    Open include in SE38 LKD02F01 and put a break point on line 3943 or following piece of code:
    IF  e1lfbkm-iban <> c_nodata.
        MOVE e1lfbkm-iban TO f_lfbk_iban-iban.
        WRITE f_lfbk_iban-iban TO blfbk_iban-iban.
      ENDIF.
    and check what value is getting populated when processing IDOC for that particular vendor.

  • Problem with Inbound Idoc

    Hi everybody.
    I´ve got a problem with an inbound idoc. I've got a standard idoc INOTIF with an extension.
    To receive this Idoc from external systema I´ve created a Z FM to process this idoc.
    The problem is that when this idoc get to SAP the FM never is executed and the idoc appears with red flag and show me
    the next error: No status record was passed to ALE by the application and the idoc is shown with the status 51.
    ¿¿How can I fix this??
    Thanks a lot
    Regards

    hi
    and also give the funtion type is function module in we57 and in BD51 give ur ZFM and give 1 in input.t field.
    now you can see ur FM in WE42 under Identification field F4 value.
    The FM which is created by you  it should be in F4 help list fo field Identification in we42.
    and give the  Message type and Process code in we20 in inbound parameters.
    i am sure this will work .
    regards,
    Kiran Jagana

  • Problem with HR inbound IDoc

    Hi,
    I have a problem with processing inbound IDocs from an external payroll system to infotype 0008.  The process is quite simple; salary changes from the payroll system is recorded to the corresponding employee's infotype 0008.  When testing I noticed that that the new record is recorded as is.  For example if there is already an existing record with the validity dates 01.01.2010 - 31.12.9999 and the new record in the IDoc is 01.01.2011 - 31.12.9999, the new record is written as is.  I would expect the system to delimit the old record correctly - similar to what would happen if you maintain records online.  There is no error checking or any kind of processing done by the system. 
    I did some debugging and found out that the function module linked to process code HRMD writes the information directly to the database.  If this is a standard way of doing this, it is really unusual.
    Has anybody else encountered this?  Any pointers?
    Thanks.
    Edited by: Theo Droste on Jan 20, 2011 11:56 AM

    Hi
    This is correct, the ale programme writes the data directly to the database, I have faced this isssue on occassion. I once raised an oss message on this as well, and sap confirms this is what happens. If it is a sap to sap ale, it somehow seems to work, - this could be because the outgoing idocs are created by sap itself  but if it is a non sap to sap ale the onus is on us to ensure that the external system sends the correct data to sap in the way we intend it to be displayed.
    that is how it has been in my experience. It is unusual, but apparently not impossible. Please let us know if you find out anything different.

  • Inbound IDoc(HRMD_A07) problem in delimiting the infotype records

    Hi All,
    I am using Inbound IDoc (HRMD_A07) approach to update infotypes. I found that I am able to create a record in an infotype, but there is a problem in delimiting the infotype.
    Please help me out in case I am missing something.
    Thanks,
    ABAP_DEV

    Hi,
    Did you get this resolved. Even i'm facing this issue. Is it a config or do we have to do something in the IDOC.
    Thanks,
    Jilly

  • Inbound iDoc for POS message WPUUMS problem

    Hello all,
    I encountered a strange thing with the inbound idoc for POS with the message WPUUMS.
    I've created a new segment with we30 as an extension to the WPUUMS01 like this.
    WPUUMS01
    --E1WPU01
    E1WPU02
    ZNRLOT "this is my added segment
    E1WPU03
    E1WPU04
    E1WPU05
    E1WXX01
    The idocs (external xml files) enter correctly in SAP, when I view them with WE02 al the segments are correctly populated with the right data and they are ready for processing with status 64.
    After processing (with the program RBDAPP01 or with WE19 etc. doesn't matter, both uses IDOC_INPUT_POS_SALES_ACCOUNT ) comes the problem:
    The Material Document and Billing Document (Invoice) ARE GENERATED WITH ONLY THE FIRST ITEM. I mean that the iDoc has more items(materials) and should generate the material document and billing document with all the items, not just with the first one.
    As a conclusion:
    1. iDoc is loaded correctly in SAP with all the data in the segments, also in the new segment, and of course has more items.
    2. the problem is that after after processing, the generated document material and billing document have only 1 position, the first item from the iDoc.
    Any help in fixing this issue will be welcomed.
    Traian Mustata
    SAP ABAP Consultant

    check for the qualifier QUALARTNR. Is it filled accordingly in the z segment? U may also check by debugin the f/n module in we19

  • Problem with user exit EXIT_SAPLIEDI_001 for Inbound Idocs in replacing G/L

    Hello all,
    I am currently facing an issue where my IDOC where exit EXIT_SAPLIEDI_001 is not appearing to work properly.
    Basically I am using the FM that processes the inbound idoc (IDOC_INPUT_INVOIC_FI) to post an accounting document. We needed a solution where we need to substitute one of the G/L Accounts.
    The current process in our SAP system is that we are creating a billing document which automatically generates the output type (running: program rsnasted subroutine edi_processing) to create and process the inbound idoc. 
    So I discovered FM EXIT_SAPLIEDI_001 which exports company code and G/L Account back does this.
    In this exit, Since I needed to get data from the IDOC, I used the logic ASSIGN: ('(SAPLIEDI)IDOC_DATA[]') TO <fs_edidd> to get the DATA Records for further processing.
    During the development and testing phase in the Sandbox system this works.
    However when we moved this to production we encountered a situation where the G/L account was not being substituted so were assuming EXIT_SAPLIEDI_001 is not working properly. However when I reprocess this in production either by running the idoc with errors RBDMANI2 or BD87 the IDOC is properly posted and the G/L Account is substituted as well as if I try to repeat the output type of the billing document. So there are instances when in the actual business scenario it does not work except when I reprocess it.
    I was wondering if there are any ideas why this could have happened?
    Oh ... I  also noticed when we transported the objects of the exit. When I try to double click the subroutine I made inside the exit it said the object does not exist. I had to generate the function group of FM EXIT_SAPLIEDI_001 in SE80 in production for it to reflect. I was wondering if this could have caused the issue.
    Well I hope to hear from you.
    Regards
    Edited by: Rob Burbank on Dec 6, 2011 1:03 PM

    Hi,
    Check in t.code CMOD whether project is active or not (Activate the Project)
    BR,
    Vijay

  • Problem in Inbound Idoc creation

    Hi experts,
                          My requirement is i want to send purchase order from one system to another system as sales order using ALE and IDOC concept...
    I have done configuration settings in both systems..i am using standard message type ORDERS....i am getting outbound IDOC sucessfully...but i am getting error in inbound idoc like Sales organization,distribution channel is not determined for customer 1000 and vendor 1005...
    Can anybody tell me how to rectify this?
    Thanks & Regards,
    Praveena....

    Dear praveena,
    ...salesorganization ..distribution channel ..division not determined for customer 1000...
    i think this is because in your inboud system customer is not created in that sales org, distribution channel and division.
    Just extend this customer to slaes org, distribution channel and division what appearing in error using XD01, then try.
    might be that is the reason.

  • Problem with processing edited inbound idoc

    hi
    i am editing an inbound idoc as a result it goes to status 69.
    Then to process this IDoc through program 'RBDAPP01', i am changing the status of the idoc to 64 through IDOC_STATUS_WRITE_TO_DATABASE'.
    But after that when i am calling transaction for RBDAPP01 passing the idoc number it gives me a message 'IDoc is still being processed' and the status is 64.
    Any help on the same is highly appreciated.
    Thanks.

    Hi Anand,
    If you have custom program written, please add FM <b>DEQUEUE_ALL</b> at the end of FM IDOC_STATUS_WRITE_TO_DATABASE. This will prevent overflow of the lock table for large number of IDOCs prior to call program RBDAPP01.
    If you run manually via SE37, please ensure you are completely out from FM IDOC_STATUS_WRITE_TO_DATABASE. Then you can run program RBDAPP01. Please use program RC1_IDOC_SET_STATUS to convert IDoc status.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward point if helpful

  • Creation of Sales Order and Service Contract from Inbound IDOC

    Hi Experts,
    My requirement is to create a Sales Order as well as a Service Contract from one Inbound IDOC. I am getting the Inbound IDOC from a third Party. The message type is ORDERS and Basic Type is ORDERS02. How ever i am using an extension type IDOC which carries all the required data for Sales Order and Service Contract. My requirement is like, to create a Sales Order first.
    I have created a Z FM which is attached to the Process Code and subsequently to the message type. Inside the FM i an calling FM 'IDOC_INPUT_ORDERS' for creation of Sales Order. After that i am changing the IDOC data for the Document Type. I am changing the document type which is responsible for Contract Creation.
    Then I am again calling the FM 'IDOC_INPUT_ORDERS' for creation of Contract with the help of IDOC data. But here the Contract is not getting created. It's getting failed during the Batch input session.
    I need to solve this problem as soon as possible. Please help me. If there are any other options also please share.
    Thanks in Advance.
    Regards,
    Priyabrata

    Actually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
    Regards,
    Priyabrata

  • Creation of Service Contract from Inbound IDOC

    Hi Experts,
    I am using Inbound IDOC type ORDERS02 with message type ORDERS for creation of Sales Order. Now my requirement is like to create a  Service Contract from that Inbound IDOC. The IDOC type contains all the data require to create a Service Contract. The scenario is like, after creation of Sales Order it will check for the corresponding Service Contract exits or not by querying on a Z table which contains all those entries.
    So my idea is to create a Z Program, in which it will check for the Service Contract and will create the same by reprocessing the same IDOC or by calling some Function Module. Please suggest how shall i proceed to create a Service Contract.
    Is there any way to reprocess the IDOC or to collect the Data from the IDOC segments pass them to a FM which is responsible for creation of Inbound IDOC. Please suggest if this is feasible.
    Thanks in Advance.
    Regards,
    Priyabrata.

    Actually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
    Regards,
    Priyabrata

  • Inbound idoc for updating delivery date of purchase order

    Hi All,
    Our vendor sends a delivery file consisting of delivery date and quantity(could be partial) for line items of a purchase order.
    I need to update the Purchase order line item with the delivery date and quantity sent from the Vendor. It should add a new confirmation line with custom confirmation category in the confirmation tab of the line item in the Purchase order.
    Each time we get a delivery file we need to add a new confirmation line in the confirmation tab of the purchase order line item.
    How can I get this working using inbound idoc processing? Which Idoc type should I use to solve my issue. Will ORDERSP work for my scenario?
    Thank you,
    Sonali.

    >
    sonali ashi wrote:
    > We have all EDI set up done for ORDERSP idoc in our system. Problem when I use this idoc type by default system is always adding confirmation catgeory 'AB' but we want our custom  category to be added instead of 'AB'.
    > Edited by: sonali ashi on Dec 23, 2010 9:47 PM
    Confirmation category used for order acknowledgement is define in configuation. You can change that from AB to your custom condition and EDI should pickup that.
    SPRO->Material Management->Purchasing->Confirmation->Define Internal Confirmation Category
    >
    sonali ashi wrote:
    > I have also noticed that 'AB' confirmation accepts only full quantity order acknowledgement through Idoc processing.
    > Manually I can add a "AB" confirmation for partial quantity but in the idoc processing it fails.
    > Edited by: sonali ashi on Dec 23, 2010 9:47 PM
    Check tolerance limit defined for confirmation category in 'Conformation Control' Node in SPRO at same level as above.
    Regards,
    Pawan.

  • Error while processing inbound Idoc (HRMDA_07) with FM IDOC_INPUT_HRMD

    Hello,
    I have a inbound Idoc of type HRMD_A (basistype  HRMD_A07) which is processed by Function module (FM)  IDOC_INPUT_HRMD with  proofing. After processing an Idoc the status Monitor for ALE messages (BD87) tell me that my Idoc has status 53, which should be the result i would like to have.
    Unfortunately when i go to transaction PA20 and check the infotypes, i see that infotype 0302 isn't created. When analyzing this problem i see that during the processing the Infotypes are posted with HR_MAINTAIN_MASTERDATA (dialog mode is 0 and luw_mode = 0 from include LRHA2F02 FORM save_pa_pb_infty)  When this is done for infotype 0302 sy-subrc <> 0 the message is A complex application error has occured. This error message is placed in Export parameters
    Return and Return1
    of HR_MAINTAIN_MASTERDATA. When the program returns to the calling Form it checks if there is message of type E in HR_RETURN (see below) :
    CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
              EXPORTING
                pernr                          = ins_objects-objid       "#EC DOM_EQUAL
                actio                           = 'INS'
                tclas                           = tclas
                dialog_mode               = dial_mode
                luw_mode                  = '0'
                no_existence_check = $cross
                no_enqueue              = $cross
              IMPORTING
                return1                       = return
                hr_return                    = hr_return
              TABLES
                proposed_values    = proposed_values.
            REFRESH proposed_values.
         IF hr_return-msgty = 'E'.                           "note 984409
          CLEAR protocol_error.
          protocol_error-msgty  = hr_return-msgty.
          protocol_error-msgid  = hr_return-msgid.
          protocol_error-msgno  = hr_return-msgno.
          protocol_error-msgv1  = hr_return-msgv1.
          protocol_error-msgv2  = hr_return-msgv2.
          protocol_error-msgv3  = hr_return-msgv3.
          protocol_error-msgv4  = hr_return-msgv4.
          READ TABLE t_hrobjinfty WITH KEY objid = hr_return-pernr
                                           infty = hr_return-infty
                                           subty = hr_return-subty.
          protocol_error-segnum = t_hrobjinfty-segnum.
          protocol_error-routid = 'create_prf_pa_pb_object'
    As mentioned above, the error message is only placed in the parameters Return and Return1  and not in HR_RETURN.please read the first reply

    Hi,
    I think you have preety much done from your end itself .
    Could you please tell me what you got in this parameters:
         protocol_error-msgty  = hr_return-msgty.
          protocol_error-msgid  = hr_return-msgid.
          protocol_error-msgno  = hr_return-msgno.
          protocol_error-msgv1  = hr_return-msgv1.
          protocol_error-msgv2  = hr_return-msgv2.
          protocol_error-msgv3  = hr_return-msgv3.
          protocol_error-msgv4  = hr_return-msgv4.
    It may help us to track down the issue in more better way .
    Thanks!

Maybe you are looking for