Messages in abap program

Hi All,
When iam using a message type as 'W' (Warning) in my program , the output is not showing the warning message , instead it showing the error message . Can any one solve my doubt .  Plz tell me the explanations for my problem .
My Sample Code :
DATA: BEGIN OF structure,
      name(10) TYPE c,
      age TYPE i,
      place(10) TYPE c,
      END OF structure.
DATA : wa LIKE structure,
       itab LIKE structure OCCURS 0.
DATA : v_var TYPE i .
*BREAK-POINT.
wa-name  = 'raj'.
wa-age   = 26.
wa-place = 'bangalore'.
APPEND wa TO itab.
CLEAR wa.
wa-name  = 'praveen'.
wa-age   = 23.
wa-place = 'chennai'.
APPEND wa TO itab.
CLEAR wa.
READ TABLE itab INTO wa WITH KEY name = 'TAJ'.
IF sy-subrc = 0.
  WRITE : / wa-name,
            wa-age,
            wa-place.
ELSEIF sy-subrc = 4.
  MESSAGE text-001 TYPE 'W'.
ENDIF.

Hi,
Warning messages can be used at only at (AT SELECTION-SCREEN) event.I ahve modified ur code and checked it worked.
DATA: BEGIN OF structure,
name(10) TYPE c,
age TYPE i,
place(10) TYPE c,
END OF structure.
DATA : wa LIKE structure,
itab LIKE structure OCCURS 0.
DATA : v_var TYPE i .
parameters : p_raj like mara-matnr.
*BREAK-POINT.
wa-name = 'raj'.
wa-age = 26.
wa-place = 'bangalore'.
APPEND wa TO itab.
CLEAR wa.
wa-name = 'praveen'.
wa-age = 23.
wa-place = 'chennai'.
APPEND wa TO itab.
CLEAR wa.
at selection-screen.
READ TABLE itab INTO wa WITH KEY name = p_raj.
IF sy-subrc = 0.
WRITE : / wa-name,
wa-age,
wa-place.
ELSEIF sy-subrc = 4.
MESSAGE text-001 TYPE 'W'.
ENDIF.
Regards,
Nagaraj

Similar Messages

  • Error messages in ABAP program are stored in which table

    hi all,
    Can anyone tell
    error messages in ABAP program are stored in which table??

    Hi Sir ,
    Please have a look below .Hope it is suitable and simpler solution for your question.
    Please do reward if useful.
    Thankx.
    Fuction module for storing error messages  ->'format_message'
    for example...
    data : v_message(100) type c.
    call transaction NNNN mode A update S messages into it_messages.
    loop at it_messages where msgty = 'E'.
    call function 'format_message'
    exporting
    *it_messages details
    importing
    v_message.
    write :/ v_message.
    clear v_message.
    endloop.
    Anothe method - ->
    Here is a sample of the program code for that:
    LOOP AT it_messtab.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    id = it_messtab-msgid
    lang = it_messtab-msgspra
    no = it_messtab-msgnr
    v1 = it_messtab-msgv1
    v2 = it_messtab-msgv2
    IMPORTING
    msg = g_msg
    EXCEPTIONS
    OTHERS = 0.
    IF it_messtab-msgtyp = 'S'.
    it_sucess-sucess_rec = g_msg.
    it_sucess-lifnr = it_header-lifnr." Based on your field
    it_sucess-tabix = v_lines.
    APPEND it_sucess.
    ELSEIF it_messtab-msgtyp = 'E'.
    it_error-error_rec = g_msg.
    it_error-lifnr = it_header-lifnr.
    it_error-tabix = v_lines.
    APPEND it_error.
    ELSE.
    it_info-info_rec = g_msg.
    it_info-lifnr = it_header-lifnr.
    it_info-tabix = v_lines.
    APPEND it_info.
    ENDIF.
    ENDLOOP.

  • Status Message for ABAP Program

    Hello Gurus,
    I have an internal table. I placed the contents of the internal table on the application server using executable program. Everything works fine.
    When I execute the program, the selection screen appears and after I give the inputs and execute again, the file is placed on the application screen and the screen is back to the abap code from selection screen.
    I want a status message at the bottom indicating that the file was placed in the application server successfully. If it fails then I need the failure message that the file was not placed.
    Please help me out how I can get these messages when I execute my program and where I need to place this code in my program.
    Regards,
    Balu

    Hi,
    You would be using OPEN DATASET, to transfer the internal table contents to Application Server file.So check sy-subrc.
    OPEN DATASET.....
    <b>IF sy-subrc eq 0.</b>
    loop at itab.
    transfer itab....
    endloop.
    Close Dataset.
    Message 'File successfully saved!'.
    <b>else.</b>
    Message 'Error in saving the file !'.
    <b>endif.</b>
    Best regards,
    Prashant

  • Message: The ABAP program lines are wider than the internal table.

    sorry for stupid question.... can you please tell me what I need to check?
    The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72
    characters wide. The program line is
    75 characters wide.
    Uf, I can't find the mistake
    BR

    Hi,
    please try to change some settings and see ...
    SE38->program->Display->Utilities->Settings->Abapeditor->editor, check the last check box (downwards-Comp Line Length)...
    If you are using merge fundtion module try to delcare the final internal table like this
    data : BEGIN OF i_final OCCURS 0,
            matnr LIKE mara-matnr,       "Material Number
            maktx LIKE makt-maktx,       "Material Description
            END OF i_final.
    Regards,
    Nagaraj

  • Error in executing ABAP program. Error occurred when creating dataset

    hi,
    when I use LKM SAP ERP to Oracle (SQLLDR) to extract data from SAP ERP server. I execute my interface, and it's stop at extract data step.
    This is message:
    java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset/abc/ZODI_13001_6001_GLOBAL.txt
    I tried others path name, tried slash or backslash. This is content in code tab
    OdiSAPAbapExecute "-UPLOAD=1" "-EXECUTE=1" "-EXECUTEBASE_RKM=0" "-ZRFC_RUN_INSTALL=1" "-ABAP_PROGRAM_NAME=ZODI_13001_6001" "-HOST=10.86.87.24" "-USER=sv_hoa" "-PASSWORD=<@=snpRef.getInfo("SRC_PASS") @>" "-SAP_CLIENT=800" "-SAP_LANGUAGE=EN" "-SAP_SYSTEM_NUMBER=02" "-SAP_FUNCTION_GROUP_NAME=ZODI_FGR_13001" "-CONNECTION_POOL_NAME=SAP_ODI_ERP_POOL_10.86.87.24" "-CONNECTION_POOL_SIZE=10" "-FILE_DELIMITER=<@=""+(char)8@>" "-FILE_NAME=ZODI_13001_6001_GLOBAL.txt" "-FTP_HOST=10.86.82.108" "-FTP_USER=anh" "-FTP_PASSWORD=<@=sFtpPassword@>" "-FTP_PASSIVE_MODE=1" "-FTP_TRANSFER_TIMEOUT=100000" "-ODI_VARIABLE_NAMES=" "-ODI_VARIABLE_VALUES=" "-USER_ABAP_PARAMETER_NAMES=IV_DELIMITER,CHAR3;IV_FILENAME,CHAR255;IV_USER,CHAR35;IV_PWD,CHAR35;IV_HOST,CHAR35;IV_HASHVALUE,CHAR35;IV_PATH,CHAR35;IV_MAX_ROW_CNT,SYTABIX;IV_FETCH_BATCH_SIZE,SYTABIX;" "-USER_ABAP_PARAMETER_VALUES=<Value>" "-USER_ABAP_PARAMETER_SEPARATOR=<Value>" "-ABAP_TABLE_PARAMETERS=RETURN,BAPIRETURN;ET_FILE_RETURN,BAPIRET2" "-ABAP_EXPORT_PARAMETERS=ERRORMESSAGE;SY-MSGV1" "-LOG_FILE_NAME=C:\Users\anh\AppData\Local\Temp\SapAbapExecuteOpenTool_13001.log" "-FTP_PATH=/abc/" "-DEV_CLASS=ZODI_DEVCLASS" "-MAX_ROW_COUNT=" "-FETCH_BATCH_SIZE=100000" "-HASH_VALUE_MARKER=HVM" "-ABAP_PROGRAM_BODY=
    *Final Type declarations
    TYPES : BEGIN OF ty_final,
    Y03HOCSINH_HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID,
    Y03HOCSINH_MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH,
    Y03HOCSINH_TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH,
    Y03HOCSINH_GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH,
    Y03HOCSINH_DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI,
    Y03HOCSINH_GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU,
    END OF ty_final.
    *Final Temp Type Declarations
    TYPES : BEGIN OF ty_final_tmp,
    Y03HOCSINH_HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID ,
    Y03HOCSINH_MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH ,
    Y03HOCSINH_TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH ,
    Y03HOCSINH_GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH ,
    Y03HOCSINH_DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI ,
    Y03HOCSINH_GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU ,
    END OF ty_final_tmp.
    *Final Target Type Declarations
    TYPES : BEGIN OF ty_final_target,
    C0_Y03HOCSINH_HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID,
    C1_Y03HOCSINH_MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH,
    C2_Y03HOCSINH_TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH,
    C3_Y03HOCSINH_GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH,
    C4_Y03HOCSINH_DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI,
    C5_Y03HOCSINH_GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU,
    END OF ty_final_target.
    * Table type for Y03HOCSINH
    TYPES : BEGIN OF ty_Y03HOCSINH,
    HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID,
    MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH,
    TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH,
    GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH,
    DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI,
    GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU,
    END OF ty_Y03HOCSINH.
    TYPES: BEGIN OF gs_text,
    line(843) TYPE c,
    END OF gs_text.
    *Structure Declarations
    DATA: wa_final_string TYPE string,
    wa_final TYPE ty_final,
    wa_final_target TYPE ty_final_target,
    wa_Y03HOCSINH TYPE ty_Y03HOCSINH,
    *Table Declarations
    tt_final TYPE STANDARD TABLE OF ty_final,
    tt_Y03HOCSINH TYPE STANDARD TABLE OF ty_Y03HOCSINH,
    tt_final_target TYPE STANDARD TABLE
    OF ty_final_target,
    tt_final_tmp TYPE STANDARD TABLE OF ty_final_tmp,
    tt_final_tmp1 TYPE STANDARD TABLE OF ty_final,
    gt_result TYPE STANDARD TABLE OF gs_text,
    *Variable Declarations
    lv_path TYPE string,
    lv_flag TYPE char1,
    C0_Y03HOCSINH_HOCSINH_ID TYPE
    STRING,
    C1_Y03HOCSINH_MA_HOC_SINH TYPE
    STRING,
    C2_Y03HOCSINH_TEN_HOC_SINH TYPE
    STRING,
    C3_Y03HOCSINH_GIOI_TINH TYPE
    STRING,
    C4_Y03HOCSINH_DIA_CHI TYPE
    STRING,
    C5_Y03HOCSINH_GHI_CHU TYPE
    STRING,
    wa_final_tmp TYPE ty_final_tmp,
    lv_file TYPE string,
    lv_datum TYPE sy-datum,
    lv_date TYPE char10,
    wa_result TYPE string,
    lv_delimiter type string,
    lv_cnt TYPE sytabix,
    *-Cursor Declaration
    lv_Y03HOCSINH_dbcur TYPE cursor,
    lv_tabix_frm TYPE sy-tabix.
    lv_delimiter = iv_delimiter.
    IF iv_hashvalue = 'HVM'.
    *Open/delete output file
    CONCATENATE iv_path iv_filename INTO lv_path.
    *Check for file existence, if found, delete it
    OPEN DATASET lv_path FOR INPUT
    IN TEXT MODE
    ENCODING DEFAULT.
    IF sy-subrc EQ 0.
    DELETE DATASET lv_path.
    ENDIF.
    *Open/create output file
    OPEN DATASET lv_path FOR APPENDING
    IN TEXT MODE
    ENCODING DEFAULT.
    IF sy-subrc EQ 0.
    *Batch Processing
    OPEN CURSOR WITH HOLD lv_Y03HOCSINH_dbcur FOR
    SELECT HOCSINH_ID
    MA_HOC_SINH
    TEN_HOC_SINH
    GIOI_TINH
    DIA_CHI
    GHI_CHU
    FROM Y03HOCSINH.
    DO.
    *Check for the counter, only for first batch
    *process new line is required...
    lv_cnt = lv_cnt + 1.
    REFRESH tt_Y03HOCSINH.
    FETCH NEXT CURSOR lv_Y03HOCSINH_dbcur
    APPENDING TABLE tt_Y03HOCSINH
    PACKAGE SIZE IV_FETCH_BATCH_SIZE.
    IF NOT tt_Y03HOCSINH IS INITIAL.
    ELSE.
    EXIT.
    ENDIF.
    LOOP AT tt_Y03HOCSINH INTO wa_Y03HOCSINH.
    MOVE wa_Y03HOCSINH-HOCSINH_ID
    TO wa_final_tmp-Y03HOCSINH_HOCSINH_ID.
    MOVE wa_Y03HOCSINH-MA_HOC_SINH
    TO wa_final_tmp-Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_Y03HOCSINH-TEN_HOC_SINH
    TO wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_Y03HOCSINH-GIOI_TINH
    TO wa_final_tmp-Y03HOCSINH_GIOI_TINH.
    MOVE wa_Y03HOCSINH-DIA_CHI
    TO wa_final_tmp-Y03HOCSINH_DIA_CHI.
    MOVE wa_Y03HOCSINH-GHI_CHU
    TO wa_final_tmp-Y03HOCSINH_GHI_CHU.
    APPEND wa_final_tmp TO tt_final_tmp.
    ENDLOOP.
    free : tt_Y03HOCSINH.
    LOOP AT tt_final_tmp INTO wa_final_tmp.
    MOVE wa_final_tmp-Y03HOCSINH_HOCSINH_ID
    TO wa_final_target-C0_Y03HOCSINH_HOCSINH_ID.
    MOVE wa_final_tmp-Y03HOCSINH_MA_HOC_SINH
    TO wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH
    TO wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_final_tmp-Y03HOCSINH_GIOI_TINH
    TO wa_final_target-C3_Y03HOCSINH_GIOI_TINH.
    MOVE wa_final_tmp-Y03HOCSINH_DIA_CHI
    TO wa_final_target-C4_Y03HOCSINH_DIA_CHI.
    MOVE wa_final_tmp-Y03HOCSINH_GHI_CHU
    TO wa_final_target-C5_Y03HOCSINH_GHI_CHU.
    Append wa_final_target to tt_final_target.
    ENDLOOP.
    free : tt_final_tmp.
    Clear wa_final_target.
    IF NOT iv_max_row_cnt IS INITIAL.
    Loop at tt_final_target into
    wa_final_target TO iv_max_row_cnt.
    MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
    TO C0_Y03HOCSINH_HOCSINH_ID.
    MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
    TO C1_Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
    TO C2_Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
    TO C3_Y03HOCSINH_GIOI_TINH.
    MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
    TO C4_Y03HOCSINH_DIA_CHI.
    MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
    TO C5_Y03HOCSINH_GHI_CHU.
    CONCATENATE
    C0_Y03HOCSINH_HOCSINH_ID
    C1_Y03HOCSINH_MA_HOC_SINH
    C2_Y03HOCSINH_TEN_HOC_SINH
    C3_Y03HOCSINH_GIOI_TINH
    C4_Y03HOCSINH_DIA_CHI
    C5_Y03HOCSINH_GHI_CHU
    INTO wa_final_string
    SEPARATED BY lv_delimiter.
    IF sy-tabix EQ 1 AND lv_cnt EQ 1.
    CONCATENATE wa_final_string
    lv_delimiter INTO wa_final_string.
    ELSE.
    CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
    lv_delimiter INTO wa_final_string.
    ENDIF.
    APPEND wa_final_string TO gt_result.
    CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
    C1_Y03HOCSINH_MA_HOC_SINH,
    C2_Y03HOCSINH_TEN_HOC_SINH,
    C3_Y03HOCSINH_GIOI_TINH,
    C4_Y03HOCSINH_DIA_CHI,
    C5_Y03HOCSINH_GHI_CHU.
    ENDLOOP.
    ELSE.
    Loop at tt_final_target into wa_final_target.
    MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
    TO C0_Y03HOCSINH_HOCSINH_ID.
    MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
    TO C1_Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
    TO C2_Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
    TO C3_Y03HOCSINH_GIOI_TINH.
    MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
    TO C4_Y03HOCSINH_DIA_CHI.
    MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
    TO C5_Y03HOCSINH_GHI_CHU.
    CONCATENATE
    C0_Y03HOCSINH_HOCSINH_ID
    C1_Y03HOCSINH_MA_HOC_SINH
    C2_Y03HOCSINH_TEN_HOC_SINH
    C3_Y03HOCSINH_GIOI_TINH
    C4_Y03HOCSINH_DIA_CHI
    C5_Y03HOCSINH_GHI_CHU
    INTO wa_final_string
    SEPARATED BY lv_delimiter.
    IF sy-tabix EQ 1 AND lv_cnt EQ 1.
    CONCATENATE wa_final_string
    lv_delimiter INTO wa_final_string.
    ELSE.
    CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
    lv_delimiter INTO wa_final_string.
    ENDIF.
    APPEND wa_final_string TO gt_result.
    CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
    C1_Y03HOCSINH_MA_HOC_SINH,
    C2_Y03HOCSINH_TEN_HOC_SINH,
    C3_Y03HOCSINH_GIOI_TINH,
    C4_Y03HOCSINH_DIA_CHI,
    C5_Y03HOCSINH_GHI_CHU.
    ENDLOOP.
    ENDIF.
    free : tt_final_target.
    IF NOT gt_result IS INITIAL.
    CLEAR wa_result.
    LOOP AT gt_result INTO wa_result.
    TRANSFER wa_result TO lv_path.
    ENDLOOP.
    ENDIF.
    REFRESH gt_result.
    *End of main loop for batching
    ENDDO.
    *Close dataset
    CLOSE DATASET lv_path.
    CLOSE CURSOR lv_Y03HOCSINH_dbcur.
    ELSE.
    DATA: lv_mesg TYPE string.
    CLEAR et_file_return.
    et_file_return-type = 'E'.
    CONCATENATE
    'Error occurred when creating dataset' lv_path
    INTO lv_mesg.
    et_file_return-message = lv_mesg.
    Append et_file_return.
    ENDIF.
    ELSE.
    CLEAR et_file_return.
    et_file_return-type = 'E'.
    et_file_return-message =
    'Installed ABAP program does not match interface definition'.
    APPEND et_file_return.
    ENDIF.
    Thanks for help

    r u able to figure it out..........i got the same error .......can someone help me fix this issue

  • Urgent: Calling ABAP Program using JMS

    Hi,
    I have a scenario where legacy system pass some messages to ABAP Program and this program can handle one message at a time (written in that way).
    Now the receiver communication channel is configured to access J2SE adapter. This J2SE adapter stores the message on R/3 system and triggers the ABAP program located in R/3 system.
    Now when multiple messages are coming at a time in SAP-XI and processed successfully and handover to J2SE adapter. But J2SE adapter triggers the ABAP program for all messages. And here is the problem. ABAP program is not supporting multi - threading.
    my idea is to use JMS adapter...can you guys suggest me how to achieve result and how to configure JMS or any other adapter to call ABAP Program so that only one message will pass to ABAP program at a time.
    Regards,
    Gourav Khare

    Hi,
    First find out where your ABAP program the data written.You need to write it into and spool then only you can see it.
    Transaction SP01, you can use the FM 'GET_PRINT_PARAMETERS' in your abap program to write to spool.
    Thanks,
    Ravi

  • ABAP Program step in PC

    Hi,
    In the Process chain I have an ABAP Program step at the end of the chain. The issue is the process chain executes successfully all the steps and this last program step also executes fine as per our logic but the status of this process step alone shows as Red due to which the whole chain status turns red.
    In the job log, i get the below message
    Process ABAP Program, variant XXX has status Canceled (instance )
    Note: This doesn't happen at all times when we execute the chain. In success case, Instance is generated for the ABAP program step.
    Kindly suggest to overcome this.
    Thanks,
    Dinesh

    Hi Dinesh,
    I have also got some random errors like these with ABAP programs in Process Chains. I could overcome the same by editing the PC, deleting the ABAP program step, re-creating the ABAP program step, saving, activating and re-scheduling the process chain.
    what I could gather is that the ABAP program steps get corrupted due to unknown reasons!!!
    Please try it. May be it is helpful.
    Thanks,
    Sarath

  • 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.

  • ABAP program to Cancel messages in Scheduled/Recorded status?

    Hi,
    Thanks for reading my post...
    Can anyone tell me whether there is an ABAP program available (or a variant) that will Cancel messages that are in Scheduled (or Recorded) status?
    Messages to be sent from ECC to PI were not sent and are left in Recorded status in ECC.  I cannot find the documentation to explain what this status is, but I'm presuming that it's similar to the Scheduled status in PI (though there's not much documentation about that either - for example, what's the difference between the 'green flag' Scheduled and the 'green flag' Released for Processing (WS)? ).  {Note to SAP: Could we have a state transition diagram please? Simple, concise and effective.}
    Anyway, the 'tick-pencil' button in SXMB_MONI (aka. CTRL-F8) can be used to cancel the messages in Scheduled/Recorded status.  But I'm looking for an ABAP program to do this.  The documentation seems to 'suggest' that this button might do the same thing as the ABAP program RSXMB_CANCEL_MESSAGES.  However, this ABAP program does not cancel messages in Scheduled status (only the messages in Error), whereas the SXMB_MONI CTRL-F8 'tick-pencil' will cancel messages in Scheduled status if they are selected.
    Is there another ABAP program available to cancel messages in Scheduled status - or is it possible to create a variant of RSXMB_CANCEL_MESSAGES that will do this?  (I'm not an ABAP programmer and I've never created a variant, but looking at the code, it seemed it might be possible to get the program to read messages in Scheduled status rather than Error status.)
    Many thanks for any help.
    Mark

    Messages are in scheduled status because they still in the queue in either 'READY' status or 'EXECUTING' status (see SMQ1/SMQ2). You don't want to automatically cancel messages that are in scheduled status because that means you are also going to cancel good messages. However, in some cases, you may want to cancel such messages especially when the message in the queue has been in 'Executing' status for long time (happens in case of long running mapping program or dropped connection etc). Such cases warrant manual intervention and hence the behavior as noted by you.
    If you can tell me why exactly you want to cancel messages that are in scheduled status, I can help you more.
    Thanks
    KK

  • Call / make a NACE-Message from an ABAP Program

    Hi all,
    Does anyone knows how to call / make a NACE-Message from an ABAP Program?
    Is there a possibility to call a functionmodul with the needed basic informations (doc. number, sales-org etc.) which will start the NACE Message Procedure?
    Reason:
    We have make IDOCs for order confirmation, delivery and billing - and make the NACE ALE/EDI Messages.
    But we have the problem that we are using Z-Reports for Mass-Printing the documents. So we have no active NACE Messages for printing and we want to send the IDOCs at the moment when we print out the docs.
    It's not possible, to change the business procedures and/or using SAP standard mass print prg. because this is too complicated (we think at the moment).
    Regards,
    Daniel

    Hi,
    Use this function module.
      CHECK xscreen = space.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          msg_arbgb = syst-msgid
          msg_nr    = syst-msgno
          msg_ty    = syst-msgty
          msg_v1    = syst-msgv1
          msg_v2    = syst-msgv2
          msg_v3    = syst-msgv3
          msg_v4    = syst-msgv4
        EXCEPTIONS
          OTHERS    = 1.
    Regards,
    Nisrin.

  • SMS from ABAP program to send error message

    Hi,
    I would like to know what are settings to be done in the system to send an SMS from ABAP program using FM 'SO_DOCUMENT_SEND_API1'.I was trying to send SMS using above FM but the error was "Cannot process message, no route from <userid> to <Mobile.no> ".
    Pls let me know the pre requisites to send an SMS using above FM.
    Regards,
    Nivas

    Hi,
    I have gone thru this blog but I want send SMS to US Mobile no.I checked other webservice but it supports only few cellular networks in US.
    any other alternate for this...
    anyway thanks for your reply
    Regards,
    Nivas

  • Server name message when triggering process chain through ABAP PROGRAM

    Hi all,
    When I am trying to execute one process chain with variant as a APD ( In this APD data is getting loaded form one Query to Transactional ODS.) This process chainis being executing through one ABAP program using the following code
    CALL FUNCTION 'RSPC_API_CHAIN_SCHEDULE'
         EXPORTING
           I_CHAIN      =  'XYZ'. ( Dummy Process chain name)
    While executing this program I am getting following message :
    You can specify the name of the application server here
    on which all jobs in the chain are scheduled
    If you do not specify a name, the jobs from batch
    management are divided between the available servers
    How to avoid this message.
    Can we write any code in the above program to assign any fixed server name so that it will not ask for any server name.
    Your help is much appreciated.
    Thanks,
    Uday.

    Hi Shanthi,
    How to write exception handling for this.
    Quick reply is nedeed.
    Thanks,
    Uday.

  • How can I retrieve the inbound XML messages (invoices) by ABAP program?

    Where are the inbound XML messages (invoices) saved in XI box?
    How can I retrieve the inbound XML invoices in XI box by ABAP program?
    Is there any method/BADI/function module to retrieve these XML invoices, so I can output these XML invoices in an ABAP report?
    Thanks in advance for your help!

    Hello Fisher,
    This Webblog will help you.
    /people/alessandro.guarneri/blog/2006/02/14/super-message-monitor-for-sap-xi
    From this blog you will understand the code behind SXMB moni .. which performs the selection from database. You can write a report as well.
    Cheers,
    Himadri

  • Help needed :How to Supress Standard pop-up messages in an ABAP program ???

    Hi All,
    A particular function module i use in my program gives pop ups with information messages when the program runs.  There is not returning parameter which throws this message.This is not desirable.  Is there a way to supress these pop ups?
    Regards,
    Venkat.

    try adding IN BACKGROUND TASK to the FM
    i want to give an example as well...
    see
    CALL FUNCTION 'POPUP_TO_INFORM' IN BACKGROUND TASK
      exporting
        titel         = '123123'
        txt1          = 'here'
        txt2          = 'there'.
    This FM actually show give an popup.. but it runs in bg mode so wont give an popup....
    hope this helps.
    Vinod,
    i dint see ur post before i posted..
    Edited by: Soumyaprakash Mishra on Dec 24, 2009 6:36 PM

  • How to create the condition record by ABAP program

    Hi Friends,
    I want to create/change the condition record of PR00 by ABAP program. It seems that there have no such BAPI/standard function can help on this. Can any one of you point out a way to me?? Thanks in addvance.
    Joe GR.

    Joe,
      Check with below FM..
    BAPI_PRICES_CONDITIONS.
    Check this link:
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    examples....
    http://www.4ap.de/abap/bapi_prices_conditions.php
    Two useful threads on Same topic
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    Re: Problem with BAPI_PRICES_CONDITIONS
    BAPI_PRICES_CONDITIONS
    Please check this sample code from other thread.
    wtable1-table_no = '306'.
    wtable1-applicatio = 'V'.
    wtable1-cond_type = 'ZPR0'.
    wtable1-operation = '009'.
    wtable1-varkey = '13001001USD 000000000050068946'.
    wtable1-valid_to = '99991231'.
    wtable1-valid_from = '20051101'.
    wtable1-cond_no = '$000000001'.
    APPEND wtable1 TO table1.
    wtable2-operation = '009'.
    wtable2-cond_no = '$000000001'.
    wtable2-created_by = sy-uname.
    wtable2-creat_date = '20051022'.
    wtable2-cond_usage = 'A'.
    wtable2-table_no = '110'.
    wtable2-applicatio = 'V'.
    wtable2-cond_type = 'ZPR0'.
    wtable2-varkey = '13001001USD 000000000050068946'.
    wtable2-valid_from = '20051101'.
    wtable2-valid_to = '99991231'.
    APPEND wtable2 TO table2.
    wtable3-operation = '009'.
    wtable3-cond_no = '$000000001'.
    wtable3-cond_count = '01'.
    wtable3-applicatio = 'V'.
    wtable3-cond_type = 'ZPR0'.
    wtable3-scaletype = 'A'.
    wtable3-scalebasin = 'C'.
    wtable3-scale_qty = '1'.
    wtable3-cond_p_unt = '1'.
    wtable3-cond_unit = 'EA'.
    wtable3-calctypcon = 'C'.
    wtable3-cond_value = '454'.
    wtable3-condcurr = 'USD'.
    APPEND wtable3 TO table3.
    CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
    PI_initialmode = 'X'
    PI_BLOCKNUMBER =
    TABLES
    ti_bapicondct = table1
    ti_bapicondhd = table2
    ti_bapicondit = table3
    ti_bapicondqs = table4
    ti_bapicondvs = table5
    to_bapiret2 = table6
    to_bapiknumhs = table7
    to_mem_initial = table8
    EXCEPTIONS
    update_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
    loop at table6 into ret.
    write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
    RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
    RET-PARAMETER,RET-ROW,RET-FIELD.
    endloop.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *EXPORTING
    WAIT =
    IMPORTING
    return = ret
    ENDIF.
    Don't forget to reward if useful....

Maybe you are looking for

  • Fields in layout

    what r the fields in LVC_S_LAYO structure?explain me each one.how to use that

  • Regarding batch managment in mm01 after stcok had been brought in

    hi, I facing a problem when i tick on batch managment after the stock had come as i had not maintained the vie while creating the material. But now i want to maintain this field as it is not allowing it. plzz help me out as it is really urgent to me.

  • How to get file name of the form attachment?

    Hi, is there anybody who is able to help me with the following problem??? I started my process from Workspace ES and as a first step I attached one locale file (IMG.JPG or IMG.TIF e.g.) as a form attachment. I used "Attachments" bookmark in the Works

  • 5.5 Issue, no longer saves Project Title, no longer uses file name

    I often work in mammoth multi-slide projects and then break them into more reasonable chunks later on, deleting extra slides and saving with a differnt file name. In Captivate 4.0 this automatically updated the Project Title in the Publish Dialog. In

  • Windows 8 and android

    I have skype on windows 8 which is logged in as my full name with a gmail address, this is the one i use mainly.  i tried adding it to android but it always wants me to login with skype name or microsoft account. neither of these are part of the wind