ABAP : call transaction CN22

Hello,
We use the call transaction to CN22 ( with MESSAGES into itab option...)  to close networks.
Sometimes we have messages in a popup window which indicate that the closing action is not possible.
Unfortunately, those kind of messages are not returned by the call transaction and  sy-subrc statement = 0.
Is it possible to read these messages with the call transaction statement ?
Thanks in advance for your answer
Jocelyne

Hi Guinamant,
you can collect al lthe error messages into bdcmsgcoll structure.
you follow the codes:
CALL TRANSACTION c_cn22 USING i_bdcdata
                          OPTIONS FROM wa_opt
                          MESSAGES INTO i_msgcoll.
note: i_msgcoll type standard table of bdcmsgcoll,
         wa_msgcoll type bdcmsgcoll.
after bdc execution , all the error messages will be colllected in to i_msgcoll.
then if you want to get the text messages, then pass it through FM:
WRF_MESSAGE_TEXT_BUILD, OR USE FORMAT_MESSAGE
READ TABLE i_msgcoll INTO wa_msgcoll
  WITH KEY msgtyp = c_e.
CALL FUNCTION 'WRF_MESSAGE_TEXT_BUILD'
      EXPORTING
        p_msgid   = wa_msgcoll-msgid
        p_msgno   = l_msgno
        p_msgv1   = wa_msgcoll-msgv1
        p_msgv2   = wa_msgcoll-msgv2
        p_msgv3   = wa_msgcoll-msgv3
        p_msgv4   = wa_msgcoll-msgv4
      IMPORTING
        es_return = lwa_bapireturn1.
Hope this can solve your problems.
Regards,
Tutun

Similar Messages

  • Web Dynpro ABAP call transaction in the foreground

    In Screen Painter/SAP ALV, we can create a screen where for example if you double click on a sales order field it can take you a VA03 transaction by :
    call transaction VA03 ... and skip first screen.
    I am creating Web Dynpro ABAP application that needs to do the same thing where if we click on the field, it will take to VA03 transaction or other transactions.
    Has anyone done this in Web Dynpro ABAP? I have done some research and determine that we cannot call transaction in the foreground? I hope I am wrong.  Any help/insights will be greatly appreciated.

    Hi Phong,
    WDA is generic client to Netweaver connection based on HTTP/S.
    At this stage on a few clients are supported. WEB dynpro client and Browsers...
    SAPGUI connects to SAP using a different protocol.
    No SAPGUI connection is implied by a WDA client connection.
    Therefore  abap statements that invoke screens and otherwise assume SAPGUI
    is connected are not supported in WDA.   eg call screen, call transaction
    You can either
                         a) build your own WDC to front end calls to BAPIs to get the Sales order data.
                        b) open/ exit to the new WDC for Sales Orders in ERP2005
                              see LORD_MAINTAIN_COMP
                           c) exit to the INTERNAL ITS URL for transaction VA03 
                               eg http://<host>:<port>/sap/bc/gui/sap/its/webgui?~Transaction=VA03
                              but getting the skip first screen may require you to call custom tran ZVA03
                               which calls VA03 to skip first screen setting the PID appropriately.
    Hopefully you opt for option a) or b).
    c) can work... I have used it from BSPs but it not pretty.
    regards
    Phil

  • Reg calling Transaction code in Webdynpro ABAP

    Hi All,
    Can I call Transaction code in Webdynpro ABAP Portal Application. If so, how can this be possible? Can anybody give me a lead?
    Thanks.
    Kumar Saurav.

    Hi,
    The most easy Way is here:
    1) Test any Webdynpro Application from SE80 when the webdynpro Browser opens to display output
    Copy its HTTP link, Suppose we get the below link
    http://r3d01web1.Siemens.dk:8001/sap/bc/webdynpro/sap/z_dynamic_view?sap-client=002&sap-language=EN
    2) Now replace some part of the above link ( webdynpro/sap/z_dynamic_view?sap-client=002&sap-language=EN )  with the new link part ( gui/sap/its/webgui?~transaction=PA30 )
    So that the newly generated link is such that the below one:
    http://r3d01web1.Siemens.dk:8001/sap/bc/gui/sap/its/webgui?~transaction=PA30
    Note in place of PA30 you can put any of your desired tcode.
    3) Now Just Make a webdynpro component and in its View layout put a LINK TO URL ui element
    and in its property REFERENCE just past the http link ( http://r3d01web1.Siemens.dk:8001/sap/bc/gui/sap/its/webgui?~transaction=PA30 )
    4) Activate and test your webdynpro Application.

  • Timeout Error in Call Transaction on Asynchronous Abap Proxy

    Hi Gurus!!
    We have a problem with a Call Transaction on Asynchronous Abap Proxy. When the process of Call Transaction (transaction CO02) takes more than 10 minutes, the process is cancelled with sy-subrc 1001 and the Abap Proxy continues with the execution. Strangely, there is a short dump in ST22 on transaction CO02, although on the ABAP Proxy we don't get any dump.
    When this process is called from a Background Job no dumps are get.
    Somebody knows if there is a problem with the Asynchronous ABAP Proxy executing CALL TRANSACTION statementent?
    Thanks and regards,
    Manuel.

    and the message after recording is
    Number               1
    Transaction          F-22
    SY-SUBRC             0
    Messages
    FB01                SAPMF05A                                0301WEZ001                066
    FB01                SAPMF05A                                0300WEZ001                066
    FB01                SAPMF05A                                0300EEZ001                073
    I F5 573                   Correct the error reported before on the next screen
    FB01                SAPMF05A                                0300WEZ001                066
    FB01                SAPMF05A                                0300EEZ001                073
    I F5 573                   Correct the error reported before on the next screen
    FB01                SAPMF05A                                0330WEZ001                066
    FB01                SAPMF05A                                0301WEZ001                066
    FB01                SAPMF05A                                0301WEZ001                066
    FB01                SAPMF05A                                0301WEZ001                066
    S F5 312                   Document 100001677 was posted in company code 3100

  • Error when Calling Transaction in ABAP Proxy

    Hi All,
    I'm trying to call a transaction in synchronous ABAP Proxy, but there's a CNTL_ERROR in the details of SXMB_MONI.
    I've checked some threads related to this problem, but they're not solved yet.
    Please advise, can I use "call transaction" in synchronous ABAP Proxy ? Is there any additional setting / code to prevent the error ?
    Thanks in advance,
    Andy S

    Hi Stefan,
    I'm trying to assign marketing attributes in our CRM Business Partner Transaction, which is triggered by messages sent from some 3rd party application.
    Recently, I find out that this transaction (TCode BP) raise the same error (CNTL_ERROR) if run background from SM35. So the problem is not about calling transaction in ABAP Proxy, but due to the TCode BP itself.......
    My ABAPER friend is trying to find the BAPI to replace this call transaction .........
    Thanks a lot for your response........
    Regards,
    Andy S

  • Call Transaction (BAPI) in ABAP Web Dynpro

    I'm developing a ABAP WD application which make use of a RFC BAPI. The BAPI will then use call transaction to perform certain operation on R3. 
    <b>CALL TRANSACTION 'IQS12' USING bdcdata MODE 'P'
      MESSAGES INTO itab.</b>
    It works fine when I tested it using TCode SE37. When the call transaction fails all error message is trapped inside the internal table.
    However when I run it using ABAP WD, it does not return the internal table but an error page on the portal. The error message was displayed on the portal page. I would like to handle the error message by my own. Is there any way doing this?
    Appreciate if anyone can sort this out for me. Thanks in advance.
    Ricky

    Hi,
    It's okie now. I have found out that this is a known issue and there's a SAP notes (935725) for that.
    According to the notes, call transaction with message type E will fail if the BAPI is executed through http.
    Thanks for replying. Appreciate that.
    Ricky

  • CALl Transaction Failing in ABAp Proxy

    Hi All,
    We are trying to CALL the VL02n Transaction in our ABAP Proxy Class Code. But the System is somehow not able to CALL The Transaction.
    But if we create a BDC Session the session is getting created.
    Any inputs as to why this is falling.
    Regards,
    Arunava

    Hi there,
    Arun and I are working on this issue together.
    We have tried the Call Transaction with mode 'N', and it does not work.  We get sy-subrc = 1,001 from the Call transaction statement.  We we run it in Mode 'A', we get kicked out from the session completely.  The user we are using to connect from XI to ECC has SAP_ALL, and is also a Dialog user.
    Any help/ideas would be very well apprciated...
    Regards,
    Jawwad

  • ABAP prog with Call Transaction  to SU01 will not add roles in a CUA client

    I am modifying a current ABAP program that works in a non-CUA client to hopefully execute in a CUA client.  This program performs a Call Transaction to tcode SU01 and adds roles to an existing user.  I used tcode SHDB to identify the new BDC commands needed for CUA when using tcode SU01.  When executing the program in the CUA client  it does not save the roles to the user.  There is no error message or abnormal termination.
    When I assign the role to the same user that's referenced in my program directly with tcode SU01 it works fine.  Its just when I run the ABAP program the role assigment is not retained.  I opened a Customer Message with SAP and they referenced OSS Note 93802 and said this was a consulting question.  My program is not abending as referenced in Note 93802, it just does not add the role.
    Has anyone been able to get this to work in a CUA client?

    Hi,
    it should be fairly simple to create a new ABAP using the BAPI's related to business object USER. Call BAPI_USER_CREATE1 to create the users, and BAPI_USER_LOCACTGROUPS_ASSIGN to assign roles in a CUA environment. It should go something like this:
    [read file with user data into internal table wt_users]
    [read file with role assignments into internal table wt_roles]
    Loop at wt_users into wa_user.
      [create LOGINDATA, ADDRESS and other structures for user in BAPI below, based on the data in wa_user]
      call 'BAPI_USER_CREATE1'
      exporting
        username                      = [the user name from input file]
      NAME_IN                       =
        logondata                     = [structure for logondata]
        password                      = [initial password value]
      DEFAULTS                      =
        address                       = [address structure created above]
        [etc.]
      if sy-subrc eq 0.
    Assign roles for the user
    clear wt_activitygroups. refresh wt_activitygroups.
    loop at wt_roles into wa_roles where username = wa_user-username.
        [build an internal table, wt_activitygroups, for system/role assignments for the user]
    endloop.
        call BAPI_USER_LOCACTGROUPS_ASSIGN
          exporting
            username                      = [the users name]
          tables
            activitygroups           = wt_activitygroups
            return                       = wt_return.
    Endloop.
    Ideally, you would have two input files: one with the user data (one record per user), and another one containing the data for the BAPI_USER_LOCACTGROUPS_ASSIGN (on the format USERNAME, SYSTEM, ROLENAME); one entry per line. You'd loop at the first table, containing the user data, then create the user, then loop at all entries in the system/role assignment file for the same username, building an internal table of role assignemnts; then call the second BAPI (provided there were any role assignments to assign for that user!)
    Hope this makes sense. It's not rocket science really; you can omit most of the parameters of BAPI_USER_CREATE1, and the second BAPI is even simpler. You could consider validating the input data by checking entries in table USRSYSACT, which contains all valid system/role assignments as seen from the CUA system (this table gets updated every time you do a "text compare" from within SU01.
    Regards,
    Trond

  • How to call transaction in an abap program

    how do we open a transaction thru an abap program and pass a parameter to it

    Use call transaction. You can fill up the parameters in the BDC internal table
    DATA:   bdc_tab LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
    DATA:   messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    CONSTANTS: c_tcode LIKE t130m-tcode VALUE 'FB01'. "Tcode you want to call
            CALL TRANSACTION c_tcode
                 USING  bdc_tab
                 MODE   'N'
                 UPDATE 'S'
                 MESSAGES INTO messtab.
    Error message will be captured in the messtab.
    You can goto the SAP help on Call transaction to see all the details and options.
    <b><REMOVED BY MODERATOR></b>
    Thanks.
    Message was edited by:
            Alvaro Tejada Galindo

  • Idoc syntx error me21 , abap proxy call transaction

    Hi Experts,
    I am struck with the below problem, could you please shed some light on the issue, appreciate your help and  rewarded.
    scenario:
    XI sends NEW PO message to abap proxy, in abap proxy we populate bdc_tab
    and call ME21 as below
    CALL TRANSACTION  'ME21' using bdc_tab mode 'N' update 'S'  messages into messtab.
    problem:
    EKSEKS01 idoc is getting created with syntax error status code :26  in ECC5.0
    only 5 sigments are generated in the idocs. the three segments ( E1PISHO, E1PISIO,E1PISSO not generated).
    after transaction executed it returns subrc 1001, msgid--> ME, MSGNO --> 218.
    Thanks In Advance.
    Ranjit.

    Hi Atish and Nishant,
    Thanks much  for the immediate response.
    1.Would like to know what is the mandatory data to be passed for PO creation in BDC table.
    2. Is there any user exit or where the idoc creation happens during me21 execution.
    I have verified the po in we02 , as before mentioned the three sigments are not getting created and i am not sure the reason.
    Note: We didnot have any output configured in ECC 5.0 for this idoc to be created.
    I am really not able to locate in debug mode FOR  ME21, where this ekseks01 idoc getting created and triggered.
    Appreciate your help.
    Thanks in Advance.
    Ranjit.

  • Calling ABAP Program / Transaction in WAD

    Hello Experts,
    We have requirement to call ABAP program/transaction in WAD. Can you please help us with your valuable inputs. We are using BI 7.0 !
    Thanks and Regards,
    Prawin Kumar

    Hi Praveen,
    you can try calling the ABAP class/transaction  using a custom extension as described here:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/99bd42b407114be10000000a421937/content.htm
    Brgds,
    Marcel

  • Call transaction in abap server proxy

    Hallo
    We have a problem with one of our server proxys.
    Scenario: SAP - backend system
    The functionality implemented is the creation of a service notification
    (IW51). The creation is made using batch input/call transaction and is
    capsuled in an function module. In case of error by creation, the
    message table will be read and a application error will be raise.
    In the implementation of the proxy class the function module will be called
    and the exceptions will be read and put in the response.
    In case of success by the creation of the notification, everything is working ok.
    In case of error in the call transaction, we will receive a "server
    error" in XI, even if the error is catched and treated. In the trace we can see the error message from the call transaction, even if we do not send these messages in our response anymore.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText><html> <body> <H1> 500 SAP Internal Server Error </H1> <B> Error message: </B> Counter reading smaller than in previous document 10000009340 ( <B> type of termination: </B> ERROR_MESSAGE_STATE ) <BR /> </body> </html></SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP response contains status code 500 with the description Internal Server Error XML element Envelope missing in SOAP message header (SAP XI Extension)</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    Ex: if by call transaction we have at the end 2 messages ( first W and second E) , we will see in the tracing in XI the second message ( so the error one ).
    In the backend system (SAP), under sxmb_moni the message in question has the status : "green flag".
    We used the same way of implemenation for all our interfaces. The only difference is that we are now using a batch and not a bapi or SAP function module for objects creation.
    Has someone any idea? . Any suggestion will be really helpful.
    Thanks.
    Anca

    Hi Udo
    My response has the following structure:
    notification nr
    + 3 fields: message type (E,W,I,S,A)
                message nr
                message text
    In case of error I should receive this filled structure and not a internal service error.
    When I am testing the class in SAP is working very good.
    Proxy Class implementation:
    CALL FUNCTION 'Z_B2_CREATENOTIFICATION1'
      EXPORTING
        P_SERNR              = i_sernr
        P_MATNR              = i_matnr
        P_CDGRP              = i_cdgrp
        P_CODE               = i_code
        P_KUNAG              = i_kunag
        P_DATE               = i_data
        P_COUNT              = i_counter
      P_NTYPE              = 'Z7'
      P_VKORG              = '2730'
      P_VTWEG              = '20'
      P_SPART              = '10'
      P_PARVW              = 'AG'
      P_NAME               =
        P_EMAIL              = i_email
    IMPORTING
       E_QMNUM              = e_qmnum
       e_return             = e_error
      TABLES
        T_SPARES             = t_spares
    EXCEPTIONS
       EQUI_NOT_FOUND       = 1
       ERROR_EMAIL          = 2
       MEAS_POINT           = 3
       ERROR_NOTIF          = 4
       OTHERS               = 5
    output-MT_CREATE_NOTIFICATION1RESPON-returncode = sy-subrc.
    case SY-SUBRC.
    when 1.
    output-MT_CREATE_NOTIFICATION1RESPON-rctxt = 'equi'.
    when 2.
    output-MT_CREATE_NOTIFICATION1RESPON-rctxt = 'error email'.
    when 3.
    output-MT_CREATE_NOTIFICATION1RESPON-rctxt = 'meas point'.
    when 4.
    output-MT_CREATE_NOTIFICATION1RESPON-rctxt = 'notification'.
    when 5.
    data mess type ZB2_EXCHANGE_FAULT_DATA22.
          mess-fault_text = 'others'.
          raise exception type ZB2_CX_FM_CREATE_NOTIFICATION1
                 exporting standard = mess.
    endcase.
    output-MT_CREATE_NOTIFICATION1RESPON-qmnum = e_qmnum.
    data out_return type ZB2_DT_RETURN2.
    IF e_error-type is not initial.
    out_return-type = e_error-type.
    out_return-number = e_error-number.
    out_return-message = e_error-message.
    append out_return to output-MT_CREATE_NOTIFICATION1RESPON-DT_RETURNS.
    endif.
    Regards,
    Anca

  • Call transaction in ABAP Inbound proxy

    Hi All,
    I am processing transaction KKPAN in inbound proxy. As per my knowledge, there is no BAPI or other way of processing this transaction. I have recorded a BDC, and I am calling this BDC using Call Transaction in my Inbound proxy.
    The problem is, control never returns back to the proxy after I call this BDC using Call Transaction.  However, interestingly, If there is an error in BDC, the control comes back to the proxy. Any ideas, why it does not successfully update data using BDC in inbound proxy?
    Your inputs are appreciated.
    Thanks,
    Navdeep

    Thanks for you response Akshay !
    However, It didn't solve my problem. In my case, the inbound proxy class is being called successfully. The problem comes, when I use Call Transaction in the class. The call transaction works and returns error message, if there is some error in the processing; however, for when there is no error in the BDC data, the control never comes back after call transaction.
    However, if I use SPROXY to test this interface, by copying the payload of the message and using the same user (As in Comm Channel), I am able to call Call Transaction without any problem. The data gets created successfully.
    Now this is getting really tricky.
    Still looking for ideas
    Regards,
    Navdeep
    Message was edited by:
            Navdeep Singla

  • Call transaction from the ABAP report

    Hi Gurus,
    Please help me with suggestion. I would like to access from SAP report with double click transaction FB03. I can access it, but in old transaction view ... How can I get the new transaction view?
    Here is the code,
    BR
    Saso
    IF fieldname CS 'BELNR'.
      PERFORM bdc_screen USING 'SAPMF05L' '100'.
          PERFORM bdc_field USING 'RF05L-BELNR' fieldvalue.
          PERFORM bdc_field USING 'RF05L-BUKRS' '0008'.
          PERFORM bdc_field USING 'RF05L-GJAHR' int-gjahr.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
          CALL TRANSACTION 'FB03' USING bdc_data MODE 'E'.
          REFRESH bdc_data.
    ENDIF

    Try this Example:
    REPORT  ZABHI_TABSTRIP NO STANDARD PAGE HEADING
                 LINE-SIZE 80 LINE-COUNT 60.
    TABLES : sscrfields.
    DATA  activetab(6) TYPE c .
    DATA  mat_des TYPE makt-maktx.
    DATA  pl_des  TYPE t001w-name1 .
    DATA  mat_gro  TYPE mara-mbrsh .
    DATA  mat_typ  TYPE mara-mtart .
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-010 FOR FIELD matnr.
    PARAMETERS matnr TYPE mara-matnr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-020 FOR FIELD matnr.
    PARAMETERS werks TYPE t001w-werks.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block2.
    SELECTION-SCREEN END OF SCREEN 002.
    SELECTION-SCREEN BEGIN OF SCREEN 003 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block3 WITH FRAME TITLE text-004 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-030 FOR FIELD matnr.
    PARAMETERS mbrsh TYPE mara-mbrsh.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block3.
    SELECTION-SCREEN END OF SCREEN 003.
    SELECTION-SCREEN BEGIN OF SCREEN 004 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block4 WITH FRAME TITLE text-005 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-005 FOR FIELD matnr.
    PARAMETERS mtart TYPE mara-mtart.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block4.
    SELECTION-SCREEN END OF SCREEN 004.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1
                                        DEFAULT SCREEN 002.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2 .
    SELECTION-SCREEN TAB (15) tabs3 USER-COMMAND ucomm3.
    SELECTION-SCREEN TAB (15) tabs4 USER-COMMAND ucomm4.
    *                     DEFAULT SCREEN 002   .
    SELECTION-SCREEN END OF BLOCK tabb1.
    INITIALIZATION.
       tabs1 = text-002.
       tabs2 = text-003.
       tabs3 = text-004.
       tabs4 = text-005.
       activetab = 'TABS1'.
    AT SELECTION-SCREEN .
       CASE sscrfields-ucomm.
         WHEN 'UCOMM1'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 001.
           tabb1-activetab = 'TABS1'.
           activetab = 'TABS1' .
         WHEN 'UCOMM2'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 002.
           tabb1-activetab = 'TABS2'.
           activetab = 'TABS2'.
            WHEN 'UCOMM3'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 003.
           tabb1-activetab = 'TABS3'.
           activetab = 'TABS3'.
            WHEN 'UCOMM4'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 004.
           tabb1-activetab = 'TABS4'.
           activetab = 'TABS4'.
       ENDCASE.
    START-OF-SELECTION.
       CASE activetab.
         WHEN 'TABS1'.
           SELECT SINGLE maktx  FROM makt INTO pl_des WHERE matnr = matnr.
           WRITE: 'Material ' , matnr , mat_des .
           WHEN 'TABS2'.
           SELECT SINGLE name1  FROM t001w INTO pl_des WHERE werks = werks.
           WRITE: 'Plant ' , werks ,pl_des.
         WHEN 'TABS3'.
           SELECT SINGLE mbrsh  FROM mara INTO mat_gro WHERE mbrsh = mbrsh.
           WRITE: 'Material Group ' , mbrsh ,mat_gro.
           WHEN 'TABS4'.
           SELECT SINGLE mtart  FROM mara INTO  mat_typ WHERE mtart = mtart.
           WRITE: 'Material Type ' , mtart , mat_typ.
           ENDCASE.
    And let me know.

  • How to use call transaction 'XD03' in abap.

    Hi Experts,
    I am  use call transaction xd03 in programme but when i click on any customer number the transaction xd03 is called and it show only one customer details. i.e 1 st  in row . other customer details not show. so please write code to solved my problems

    Hi
    It's not clear where you set the USER_COMMAND routine and where you set the OK_CODE for doubleclick.
    I suppose you set the routine in the importing parameter I_CALLBACK_USER_COMMAND (?) becasue you aren't use the parameter for the event, but for OK_CODE?
    Remember the OK_CODE should be upper case:
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    "WHEN 'kunnr'.   <--------------- UPPER CASE
      WHEN 'KUNNR'.
    See my sample:
    TYPE-POOLS SLIS.
    DATA: BEGIN OF GT_FINAL OCCURS 0,
            KUNNR LIKE KNA1-KUNNR,
            NAME1 LIKE KNA1-NAME1,
          END OF GT_FINAL.
    * ALV
    DATA: GT_FIELDCAT   TYPE SLIS_T_FIELDCAT_ALV,
          GT_LAYOUT     TYPE SLIS_LAYOUT_ALV,
          GT_REPID    LIKE SY-REPID.
    START-OF-SELECTION.
      SELECT KUNNR NAME1 INTO TABLE GT_FINAL
         UP TO 20 ROWS
           FROM KNA1.
      GT_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = GT_REPID
          I_INTERNAL_TABNAME = 'GT_FINAL'
          I_INCLNAME         = GT_REPID
        CHANGING
          CT_FIELDCAT        = GT_FIELDCAT[].
      GT_LAYOUT-F2CODE = 'KUNNR'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = GT_REPID
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
          IS_LAYOUT               = GT_LAYOUT
          IT_FIELDCAT             = GT_FIELDCAT
        TABLES
          T_OUTTAB                = GT_FINAL.
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
      DATA: GWA_FINAL LIKE GT_FINAL.
      CASE R_UCOMM.
        WHEN 'KUNNR'.
          READ TABLE GT_FINAL INTO GWA_FINAL INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SET PARAMETER ID 'KUN' FIELD GWA_FINAL-KUNNR.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    ENDFORM.TYPE-POOLS SLIS.
    DATA: BEGIN OF GT_FINAL OCCURS 0,
            KUNNR LIKE KNA1-KUNNR,
            NAME1 LIKE KNA1-NAME1,
          END OF GT_FINAL.
    * ALV
    DATA: GT_FIELDCAT   TYPE SLIS_T_FIELDCAT_ALV,
          GT_LAYOUT     TYPE SLIS_LAYOUT_ALV,
          GT_REPID    LIKE SY-REPID.
    DATA: FL_INPUT_OFF.
    START-OF-SELECTION.
      SELECT KUNNR NAME1 INTO TABLE GT_FINAL
         UP TO 20 ROWS
           FROM KNA1.
      GT_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = GT_REPID
          I_INTERNAL_TABNAME = 'GT_FINAL'
          I_INCLNAME         = GT_REPID
        CHANGING
          CT_FIELDCAT        = GT_FIELDCAT[].
      GT_LAYOUT-F2CODE = 'KUNNR'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = GT_REPID
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
          IS_LAYOUT               = GT_LAYOUT
          IT_FIELDCAT             = GT_FIELDCAT
        TABLES
          T_OUTTAB                = GT_FINAL.
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
      DATA: GWA_FINAL LIKE GT_FINAL.
      CASE R_UCOMM.
        WHEN 'KUNNR'.
          READ TABLE GT_FINAL INTO GWA_FINAL INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SET PARAMETER ID 'KUN' FIELD GWA_FINAL-KUNNR.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    ENDFORM.  TYPE-POOLS SLIS.
    DATA: BEGIN OF GT_FINAL OCCURS 0,
            KUNNR LIKE KNA1-KUNNR,
            NAME1 LIKE KNA1-NAME1,
          END OF GT_FINAL.
    * ALV
    DATA: GT_FIELDCAT   TYPE SLIS_T_FIELDCAT_ALV,
          GT_LAYOUT     TYPE SLIS_LAYOUT_ALV,
          GT_REPID    LIKE SY-REPID.
    DATA: FL_INPUT_OFF.
    START-OF-SELECTION.
      SELECT KUNNR NAME1 INTO TABLE GT_FINAL
         UP TO 20 ROWS
           FROM KNA1.
      GT_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = GT_REPID
          I_INTERNAL_TABNAME = 'GT_FINAL'
          I_INCLNAME         = GT_REPID
        CHANGING
          CT_FIELDCAT        = GT_FIELDCAT[].
      GT_LAYOUT-F2CODE = 'KUNNR'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = GT_REPID
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
          IS_LAYOUT               = GT_LAYOUT
          IT_FIELDCAT             = GT_FIELDCAT
        TABLES
          T_OUTTAB                = GT_FINAL.
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
      DATA: GWA_FINAL LIKE GT_FINAL.
      CASE R_UCOMM.
        WHEN 'KUNNR'.
          READ TABLE GT_FINAL INTO GWA_FINAL INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SET PARAMETER ID 'KUN' FIELD GWA_FINAL-KUNNR.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    ENDFORM.
    Max

Maybe you are looking for

  • Merom / Conroe upgrade path for Intel iMac?

    Has anything been released about a processor upgrade path (if possible) to take the Early 2006 IiMacs from the Yonah CPU family to Merom or Conroe? I'm still steamed to be stuck with a 32-bit CPU (even though it is a good one, funny how that fact is

  • How to use VNC-Client or sim. for remote management

    Hi folks, how can i use a VNC-Client to do a remote session with a ZCM10 RM-enabled client ? Any ideas ? Regards Thorsten

  • SAPTLIST_TREE_CONTROL_DEMO

    In the SAPTLIST_TREE_CONTROL_DEMO there is an property of an item usebgcolor which makes the items grey when set to 'X'. If I run this example on my computer, only the item 'SAPTROX1', node_key 'new3' item name '1' appears in grey. Other computers on

  • BAPI FOR GOODS MOVEMENT    MB1B

    HI,        WILL ANY BODY HELP ME FOR BAPI MB1B FOR GOODS MOVEMENT 411 DEASSINGE. I'M USING THIS BAPI FOR THE SAME AND PASSING THIS DATA. wa-MATERIAL = it_data-matnr. wa-PLANT = 'SBST'. wa-stge_loc = IT_DATA-LGORT . wa-BATCH = it_data-charg. wa-MOVE_T

  • Excel dynamic time series errors

    Has anyone bumped into the problem recently that the Dynamic Time Series is not being recognized on some pc's but works fine on another? I have seen this a couple of times and I can't figure out if it is the Excel version or a problem with the add-in