Skip to Content
author's profile photo Former Member
Former Member

Any bapi for t.code IW21

Hi experts,

when i want to add notification in IW 21 tcode for that i am using this

BAPI_ALM_NOTIF_DATA_ADD but it's not woking . any one send me sample code for that .

thank you for advance.

with best regards

vas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2008 at 06:32 AM

    Hi

    What is the error your getting when using that BAPI?

    Regards,

    Vishwa.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2008 at 10:22 AM

    Hi,

    you can use these FM's ALM_PM_NOTIFICATION_CREATE , ALM_PM_NOTIFICATION_SAVE and BAPI_TRANSACTION_COMMIT to create entries in IW21

    See this sample code.

    &----


    *& Report Z94406_BAPI_ASSIGNMENT

    *&

    &----


    *&

    *&

    &----


    DATA : ITAB TYPE BAPI2080_NOTHDRI,

    NOTNO LIKE BAPI2080_NOTHDRE-NOTIF_NO,

    NOTIF LIKE BAPI2080-NOTIF_TYPE,

    p_filename TYPE STRING,

    notifheader_export TYPE BAPI2080_NOTHDRE,

    notifheader TYPE BAPI2080_NOTHDRE,

    RETURN TYPE TABLE OF BAPIRET2 WITH HEADER LINE,

    RETURN1 TYPE TABLE OF BAPIRET2 WITH HEADER LINE,

    RETURN2 TYPE BAPIRET2,

    MSG TYPE BAPIRET2-MESSAGE,

    TYP TYPE BAPIRET2-TYPE.

    DATA: BEGIN OF DATA_TAB OCCURS 0,

    notype TYPE QMEL-QMART,

    txt TYPE QMEL-QMTXT,

    floc TYPE IFLOT-TPLNR,

    END OF DATA_TAB.

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.

    PARAMETERS : p_file TYPE RLGRAP-filename.

    SELECTION-SCREEN END OF BLOCK b1.

    P_FILENAME = P_FILE.

    CALL FUNCTION 'GUI_UPLOAD'

    EXPORTING

    filename = P_FILENAME

    filetype = 'ASC'

    has_field_separator = '#'

    TABLES

    data_tab = DATA_TAB

    .

    LOOP AT DATA_TAB.

    NOTIF = DATA_TAB-NOTYPE.

    ITAB-FUNCT_LOC = DATA_TAB-FLOC.

    ITAB-SHORT_TEXT = DATA_TAB-TXT.

    • CALL FUNCTION 'ALM_PM_NOTIFICATION_CREATE'*

    EXPORTING

    notif_type = NOTIF

    notifheader = ITAB

    • SENDER = SENDER

    • ORDERID = ORDERID

    IMPORTING

    notifheader_export = NOTIFHEADER_EXPORT

    TABLES

    • NOTITEM = NOTITEM

    • NOTIFCAUS = NOTIFCAUS

    • NOTIFACTV = NOTIFACTV

    • NOTIFTASK = NOTIFTASK

    • NOTIFPARTNR = NOTIFPARTNR

    • LONGTEXTS = LONGTEXTS

    • KEY_RELATIONSHIPS = KEY_RELATIONSHIPS

    return = RETURN

    .

    IF RETURN IS NOT INITIAL.

    MSG = RETURN-MESSAGE.

    TYP = RETURN-TYPE.

    MESSAGE MSG TYPE 'I'.

    ELSE.

    CALL FUNCTION 'ALM_PM_NOTIFICATION_SAVE'

    EXPORTING

    number = NOTIFHEADER_EXPORT-NOTIF_NO

    IMPORTING

    notifheader = NOTIFHEADER

    TABLES

    return = RETURN1.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    EXPORTING

    wait = 'X'

    IMPORTING

    return = RETURN2.

    ENDIF.

    ENDLOOP .

    IF RETURN IS INITIAL.

    message 'The Notification is created' type 'I'.

    endif.

    ****************************

    Hope it helps.

    Regards,

    Syed

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.