Calling transaction through webdynpro abap applicatoin

hi,
Is it possible to call an EWT transaction or an transaction from a webdynpro abap application.
Regards,
Divya

The example demo listed works under special circumstance ONLY.
Logon to SAP.
At main menu add a favourite of type WDA.
Choose application wdr_sapgui_demo1  .
Now run demo.
The WDA app appears inside an SAP GUI screen.
Now the when the runtime API call the sapgui manager, a handle to the GUI is available.
The new transaction can now be fired. EG navigate away to new transation.
If the GUI is not already active you have another issue.
I suggest you search the forum for the use of SAPGUI shortcuts and other
such tricks . There has been a few topics and solutions discussed.
Cheers
Phil.

Similar Messages

  • Calling GuidedProcess from WebDynpro ABAP

    Hi all
    can anybody tell me that how to call GP from webdynpro ABAP.
    and what are the advantages and disadvantages in this scenario??
    if anyone reply then it would be the great help to me
    Regards
    Suresh babu

    Hey,
    You can call a GP from WD ABAP through by implementing a service call from a method that is embedded in your WD. You can refer this link for the same.
    http://help.sap.com/saphelp_nwce10/helpdata/en/44/58f9cc0d95311ce10000000a155369/frameset.htm
    But you should note here that Data exchange between ABAP WD and GP is not two way but its only one way.
    Cheers,
    Mandrake

  • 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

  • Call Transaction Through RFC

    Hi ,
    I am trying to do a call transaction through RFC call from a Middleware which is a CPIC user (only communication Non dialog User ) . 
    Call  transaction does gets executed without any error but it does not update any data.But when I run it through my user id it works absolutely fine .
    I am not sure what is causing the issue
    Security authorization?
    RFC through Non Dialog user ?
    Paramters missing in RFC  ?
    Paramatertes missing in call transaction option?
    If anyone of you has faced a similiar issue then please let me know the path forward.
    Thanks
    Vikas

    Hi Vikas,
        The problem is in Authorization? And check the mode of Process Synchoronus or asynchoronous? Both the RFC and CALL transaction should be Same /
    Thanks
    MAnju

  • Can not call RFC contains "call transaction"  in webdynpro

    We use Webdynpro to develope a UI that can create service orders in CRM
    system. We create an RFC funciton "ZKLEE_CRM_ORDER_MODIFY" in CRM,which
    contain a statement of "CALL TRANSACTION 'CRMD_BUS2000120' USING T_BDC
    MODE 'N' MESSAGES INTO MESSTAB.".
    But as we exacute the RFC from WEB,we got 3 error messages in the
    output "MESSTAB":
    1.MESSAGE ID = "DC",MESSAGE NUMBER = "006", MESSAGE = "Control
    Framework: Fatal error - GUI cannot be reached".
    2.MESSAGE ID = "SY",MESSAGE NUMBER = "002", MESSAGE = "Exception
    condition CNTL_ERROR raised."
    3.MESSAGE ID = "00",MESSAGE NUMBER = "359",and it is a terminate
    message.
    The problem is that we can use webdynpro to call RFCs that do not
    contain "call transaction" freely. At first we suspect that it is our
    RFC function's fault, but we tried it in ABAP enviroment,and it works
    OK. We also tried to call this RFC in JSP through JCO,the same error
    occurs.
    Our system enviroment is CRM 4.0, J2EE 640, kernel 640 patch 109.

    HI,
    Thank you for your information.
    Maybe you are right that BAPI/RFC can not contain "call transaction" statement. But two weeks ago, one of my colleagues tried to use "call transaction" in RFC through JCO in our R/3 enviroment(not in CRM),and he successed.
    So I suspect the kernel release. The kernel of R/3 is 640,while CRM is 620(I said our CRM kernel release is 640 before,and it is a mistake.).I will confirm whether what my colleague said is right by myself, and will also told you the result.
    Message was edited by: Vincent zklee

  • 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

  • How to call webservices in webdynpro abap

    Hi Experts,
    My requirement is I have to call an URL by exporting an XML file to that URL I have to import an XML file again i .e nothing but I have to send  request file in the form of XML and need to get response in the form of XML file from the URL .This total execution should be finished by clicking a button in webdynpro ABAP.
    Regards,
    Satya.

    Hello Satya,
    You may try to find the sample code as follows:
    1. Goto Transaction se80
    2. Select "package" --> enter "SWDP"
    3. goto "embedded packages" -->  "SWDP_DEMO" --> Web Dynpro
    Here, you will get demo applications. Find the most appropriate demo application and try to customize the code according to your requirement.
    Best Regards,
    Raju MJRK

  • How to handle unsaved data in portal through webdynpro ABAP ?

    Hi Experts ,
         I  need to handle unsaved data in SAP Enterprise Portal through webdynpro for ABAP . I got a sdn link which explained some code for this..
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/b76f4169e25858e10000000a1550b0/frameset.htm
    I tired to implement this in EXIT method of the view. but im not able to get this . Can any one help me in this ? .
    Regards ,
    Kalpana .

    Hi ,
    Yes i have checked the code . But the example itself not working when i linked the same with portal . If EXIT is not the right method , Can you help in placing the code in right method ? The code i pasted in EXIT method is 
    data L_COMPONENTCONTROLLER type ref to IG_COMPONENTCONTROLLER .
    data L_API_COMPONENTCONTROLLER type ref to IF_WD_COMPONENT.
    data L_PORTAL_MANAGER type ref to IF_WD_PORTAL_INTEGRATION.
    L_COMPONENTCONTROLLER =   WD_THIS->GET_COMPONENTCONTROLLER_CTR( ).
    L_API_COMPONENTCONTROLLER = L_COMPONENTCONTROLLER->WD_GET_API( ).
    L_PORTAL_MANAGER = L_API_COMPONENTCONTROLLER->GET_PORTAL_MANAGER( ).
    call method L_PORTAL_MANAGER->SET_APPLICATION_DIRTY_FLAG
      exporting
        DIRTY_FLAG = ABAP_TRUE .

  • 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

  • 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

  • Calling Transaction through User Decision step in workflow

    Hi all,
    Pls help me calling a transaction through User Decision step in workflow. I have attached two buttons to my User decision and the one of the outcomes to a task where I am calling the transaction through a method of BOR. But the problem is I am unable to see the transaction when I press the button on my User Decision at test run.
    Can you ppl let me know how can I achieve this?
    Pls reply ASAP...
    Thanks
    Sangharsh

    Hello Sangharsh ,
    Please Check the paramater of of the method which you define.
    e.g. I define CALL_TCODE_CJ03 method
          which have the parameters FLAG,ProjectDefinition,WBSElement2,User
          with export, import checkbox.            
    Pass the paratmeres in programs
    e.g.
    BEGIN_METHOD CALL_TCODE_CJ03 CHANGING CONTAINER.                      
    DATA:                                                          
          FLAG(1),                                                        
          PROJECTDEFINITION TYPE PROJ-PSPID,                              
          WBSELEMENT2 TYPE PRPS-POSID,                                    
          USER TYPE USR21-BNAME.                                                                               
    SWC_GET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_GET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_GET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.                
      SWC_GET_ELEMENT CONTAINER 'User' USER.                                                                               
    GET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      GET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                                                                               
    SET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      SET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                             
      CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.                                                                               
    SWC_SET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_SET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_SET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.    SWC_SET_ELEMENT CONTAINER 'User' USER. 
    END_METHOD.
    I hope it will help you.
    ***Assigning points is the way to say thanks in SDN.***
    Minaxi Shah

  • Calling ActiveX from WebDynpro ABAP application

    Hello everyone,
    I am looking for the possibility of calling an ActiveX control based application by extending my Web Dynpro ABAP application. Is this possible at all?
    Thanks,
    Amber
    Message was edited by: Amber Gupta

    Saraa_n wrote:
    Hello Bala,
    >
    > I doubt whether you can pass parameter for the TCODE ME23N because in the ME23N transaction, you can select the PO only via the popup dialog and you cannot directly enter the PO number.
    >
    > I dont think while calling TCODE via ITS you can set value in the popup dialog and execute it. Alternative would be to use ME23 TCODe.
    >
    > BR, Saravanan
    It is correct taht ME23N can be tricky (as can MIGO and MIRO) because of the way they launch.  I've done this in the past by creating a new custom program and TCoce.  The custom program has a simple parameter for the PO # so it can be passed in via URL. The logic of the custom program then starts a call transaction and handles the popup and supplies the PO #.

  • 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

  • Call transaction through ALV

    Dear All,
    when i am calling transaction VA32 then it is taking same number again and again.
    please chk code below:
    form sub_user_command1 using V_UCOMM1 like sy-ucomm
    v_selfield1 type slis_selfield.
      case V_UCOMM1.
        when '&IC1'.
          if v_selfield1-fieldname = 'VBELN'.
          clear it_kun.
          clear wa_kun.
            read table it_kun into wa_kun index v_selfield1-tabindex.
        if sy-subrc = 0.
            set parameter id 'AUN' field wa_kun-vbeln.
            call transaction 'VA32' AND SKIP FIRST SCREEN.
          endif.
          clear V_UCOMM1.
          clear wa_kun.
      endif.
      endcase.
    *clear V_UCOMM1.
    *set parameter id: 'AUN' field SPACE.
    *Clear 'AUN' with space in byte mode.    "id 'AUN'.
    endform.
    Thanks in Advance,
    Ashish Gautam

    hi,
    u using internal table without header line?
    otherwise u can try like this
    FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.
      CLEAR fcat1.
      CASE u_com.
        WHEN '&IC1'.
      <b>    READ TABLE itab INDEX sel_field-tabindex.</b>   
            IF sy-subrc = 0.
              t_mat = itab-matnr.
             SET PARAMETER ID 'MAT' FIELD t_mat.
             CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
            ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command

Maybe you are looking for