SXMB_GET_MESSAGE_PAYLOAD

hi,
Can you please tell me what are the inputs to be taken in the function module SXMB_GET_MESSAGE_PAYLOAD.
Thanks,
Shreya.

Hi Shreya,
  This FM is used to get the payload for the Msg ID in PI....and then, parse the data in the payload and retrieve certain values.
Hence you can use Msg ID from Moni as your input.
Regards,
Pinangshuk.

Similar Messages

  • Function Module SXMB_GET_MESSAGE_PAYLOAD

    I want to use FM SXMB_GET_MESSAGE_PAYLOAD to get the payload from the Msg ID in PI, and then, parse the data in the payload and retrieve certain values.  When I use the FM, my return parameter, EX_MSG_BYTES, is just a number.  How do I see the actual payload?

    Hi Susan,
      If you want to download the payload in your presentation server, follow the following steps:
    1. Convert the xstring data into binary using FM SCMS_XSTRING_TO_BINARY.
    2. Download it using GUI Download.

  • SXMB_GET_MESSAGE_PAYLOAD Function Module

    HI Everybody,
    I was trying to test function module SXMB_GET_MESSAGE_PAYLOAD in SE37.
    I input message id from sxmb_moni. It is unable to get the payload of message for me..
    Any help ?
    Does anyone have existing program for it ?
    I also want input parameters to SXMB_SELECT_MESSAGES function module.
    Regards
    Inder

    I am able to get the payload from function module now.
    The output looks like:
    3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822203F3E3C4F524445525330353E3C49444F4320424547494E3D2231223E3C4544495F44433430205345474D454E543D2231223E3C5441424E414D3E4544495F44
    How can i convert this data to proper readable format ? any other function module ?

  • Reading the XML message from Xi stored in XML format from a abap program.

    Hi Gurus,
    My requirement here is to read the data that will be coming from Xi from my custom abap program and updating 2 data base tables. The method is after the data mapping is done a class is generated in abap proxy in which a method is available. Inside the method i am writing the code for getting the Xi data stored as a payload message which can be seen in the transaction SXMB_MONI. My code is given below.
    ***begin code***
    method ZII_PAYROLL_HEADER_IN~PAYROLL_HEADER_IN.
    **** INSERT IMPLEMENTATION HERE **** ***
    data: ln type i.
    DATA: i_items TYPE TABLE OF ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
    *DATA: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_TAB5.
    data: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
    DATA:PERNR TYPE STRING.
    *data: it_ZPAYLOAD_WRAPPER16  TYPE ZPAYLOAD_WRAPPER16.
    I_ITEMS[] = INPUT-PAYLOAD_WRAPPER-BODY-XMLDOC-PAYROLL_PERIOD_OVERVIEW-EMPLOYEE_RECORD[].
    *I_ITEMS = INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
    describe table i_items[] lines ln.
    endmethod.
    **End code***
    As per the logic the data stored in the XML message should be avaialble in INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord which i am assigning to a local internal table in the class.
    But in my case there is no data coming in
    INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
    But i can see the data transffered from XI in the transaction SXMB_MONI->XML message->inbound message->payload.
    Is there any way to read the data stored in the XML message in the transaction SXMB_MONI.
    Also why the data is not coming in
    INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord inside the class.
    If there is any solution for this problem please post it.

    You can use function module SXMB_GET_MESSAGE_PAYLOAD.
    Code snippet:
    DATA: ls_mast      TYPE sxmspmast,
          ls_msgkey    TYPE sxmsmkey,
          lv_bin_xml   TYPE xstring,
          lv_str_xml   TYPE string.
    * select sxmspmast into ls_mast
      ls_msgkey-msgid  = ls_mast-msgguid.
      ls_msgkey-pid    = 'RECEIVER'.
      CALL FUNCTION 'SXMB_GET_MESSAGE_PAYLOAD'
        EXPORTING
          im_msgkey      = ls_msgkey
          im_archive     = ' '
          im_version     = ls_mast-vers
        IMPORTING
          ex_msg_bytes   = lv_bin_xml
        EXCEPTIONS
          not_authorized = 1
          no_message     = 2
          internal_error = 3
          no_payload     = 4
          OTHERS         = 5.
      IF sy-subrc EQ 0.
          lv_str_xml = cl_soap_moni_helper=>convert_xstring_to_string( xstring_in = lv_bin_xml ).
      ENDIF.

  • How to use Payload as input to a PDF document

    Hi,
    I am reading the payload using function module SXMB_GET_MESSAGE_PAYLOAD and I want to use the Payload to fill my ADOBE form.  I thought that it would be sufficient to pass to the pdf the payload but my PDF does not get populated and no error is returned.
    I created my form interface with a XSD file of the same format as the payload. I use this interface in my form and I set a data connection with a WSDL file of the same format as the Payload.
    Is there a step that I am missing? Can we pass in parameter the payload or we need to do an extra step?
    Here the code I am using to call my PDF
    Get XML output data for Message Id
            CALL FUNCTION 'SXMB_GET_MESSAGE_PAYLOAD'
              EXPORTING
                im_msgkey      = l_msgkey
              IMPORTING
                ex_msg_bytes   = l_xstring
              EXCEPTIONS
                not_authorized
                no_message
                internal_error
                no_payload.
    Create PDF
            CALL FUNCTION l_funcname
              EXPORTING
                /1bcdwb/docparams  = ls_docparams
                /1bcdwb/docxml     = l_xstring.
    Thank you

    Hi Steve,
    if your Adobe form used an xml based interface, and your xml data are into an xstring variable, then you only need the FP_JOB_OPEN and FP_JOB_CLOSE function modules - please have a look at this example; its working fine:
    DATA: gs_outputpara TYPE sfpoutputparams,
            gs_docpara    TYPE sfpdocparams,
            gs_return     TYPE fpformoutput,
            gs_result     TYPE sfpjoboutput,
            gv_form       TYPE fpwbformname VALUE 'Z_TRAVEL_REQUEST',
            gv_function   TYPE rs38l_fnam,
            gv_xml        TYPE xstring,
            gv_data_str   TYPE string.
    * create xml data
      CONCATENATE
        `<?xml version="1.0" encoding="utf-8" ?>`
        `<REQUEST>`
        `<CUSTNAME>` gs_request-custname `</CUSTNAME>`
        `<DEPARTMENT>` gs_request-department `</DEPARTMENT>`
        `<KOSTL>` gs_request-kostl `</KOSTL>`
        `<DEPDATE>` gs_request-depdate `</DEPDATE>`
        `<ARRDATE>` gs_request-arrdate `</ARRDATE>`
        `<COUNTRYTO>` gs_request-countryto `</COUNTRYTO>`
        `<CITYTO>` gs_request-cityto `</CITYTO>`
        `<CAUSE>` gs_request-cause `</CAUSE>`
        `<VEHICLE>` gs_request-vehicle `</VEHICLE>`
        `<HOTEL>` gs_request-hotel `</HOTEL>`
        `</REQUEST>`
        INTO gv_data_str.
      CALL TRANSFORMATION id SOURCE XML gv_data_str
                             RESULT XML gv_xml.
    * Get the name of the generated function module
      TRY.
          CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
            EXPORTING
              i_name           = gv_form
            IMPORTING
              e_funcname       = gv_function
    *         E_INTERFACE_TYPE =
        CATCH cx_root.
          RAISE no_active_form.
      ENDTRY.
    * Set parameters
      gs_outputpara-nodialog   = 'X'.
      gs_outputpara-preview    = 'X'.
      gs_outputpara-getpdf     = 'X'.
      gs_outputpara-connection = cl_fp=>get_ads_connection( ).
      gs_docpara-langu         = 'DE'.
      gs_docpara-country       = 'DE'.
      gs_docpara-fillable      = 'X'.
    * Open print job
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = gs_outputpara
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
        RAISE job_open_error.
      ENDIF.
    * Call the generated function module
      CALL FUNCTION gv_function
        EXPORTING
          /1bcdwb/docparams  = gs_docpara
          /1bcdwb/docxml     = gv_xml
        IMPORTING
          /1bcdwb/formoutput = gs_return
        EXCEPTIONS
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          OTHERS             = 4.
      IF sy-subrc <> 0.
        RAISE form_process_error.
      ENDIF.
    * Close print job
      CALL FUNCTION 'FP_JOB_CLOSE'
        IMPORTING
          e_result       = gs_result
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
        RAISE job_close_error.
      ENDIF.
    Edited by: Jens Haehnel on Sep 1, 2009 4:19 PM

  • How to extract SXMB_MONI message in bulk

    Hi All,
    I want to extract messages (input and output messages) for a scenario from SXMB_MONI. The volume of message is too high (more then 1k), so i would like to ask if there is any easy way to extract the message. I am on PI 7.31 dual stack.
    regards,
    Harish

    Hi Hareesh,
    For this i need to write a program and convert the Xstring to string format (SXMB_GET_MESSAGE_PAYLOAD). But i am searching for any standard option in which i do no need to write any ABAP code.
    regards,
    Harish

Maybe you are looking for