How to handle the hyperlink in alv

Hello friends,
   I made one alv report by using function.. now i want that on one coloum, if user click than it can fetch the information regarding it. please tell me how i can do.. i made a hyperlink on that coloum but i dont know how i handle it..
Regards,
Reema Jain.

REPORT zdemoab.
TYPE-POOLS: slis.
TABLES: mara.
TYPES: BEGIN OF t_itab,
       matnr TYPE mara-matnr,
       mtart TYPE mara-mtart,
       END OF t_itab.
DATA: itab TYPE TABLE OF t_itab,
      wa_itab like line of itab.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat LIKE LINE OF i_fieldcat,
      i_layout TYPE slis_layout_alv,
      g_repid TYPE sy-repid.
SELECT matnr mtart INTO TABLE itab FROM mara UP TO 10 ROWS.
CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 0.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'MARA'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'MTART'.
wa_fieldcat-tabname = 'MARA'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.
i_layout-colwidth_optimize = 'X'.
i_layout-hotspot_fieldname = 'MATNR'.
g_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
   i_callback_program                = g_repid
   I_CALLBACK_USER_COMMAND           = 'USER_COMMAND '
   is_layout                         = i_layout
   it_fieldcat                       = i_fieldcat[]
  TABLES
    t_outtab                          = itab
EXCEPTIONS
   program_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.
FORM user_command USING r_ucomm LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.
*   Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'MATNR'.
*     To pass the material no in ME22 transaction
      READ TABLE itab INTO wa_itab INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
      SET PARAMETER ID 'BES' FIELD wa_itab-matnr.
*     Sxecute transaction ME23N, and skip initial data entry screen
      CALL TRANSACTION 'MM03'.
    ENDIF.
ENDFORM.

Similar Messages

  • How to handle interactive list in alv reports

    hi experts.
    how to handle interactive list in alv reports.
    regards.
    subhasis

    HI Subhasis,
    below is the sample code for handling an interactive ALV report, hope this helps you ..
    REPORT  ZTEST_ALV123.                           
    TYPE-POOLS:SLIS.
    DATA :   IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
              IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    DATA: BEGIN OF ITAB OCCURS 0,
           VBELN LIKE VBAK-VBELN,
           POSNR LIKE VBAP-POSNR,
           END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 0,
           VBELN LIKE LIKP-VBELN,
           POSNR LIKE LIPS-POSNR,
           VGBEL LIKE LIPS-VGBEL,
           VGPOS LIKE LIPS-VGPOS,
           END OF ITAB1.
    DATA: IT_LIPS LIKE ITAB1 OCCURS 0 WITH HEADER LINE.
    SELECT  VBELN
            POSNR
            FROM VBAP
            INTO TABLE ITAB.
    IF SY-SUBRC = 0.
      SORT ITAB BY VBELN .
      SELECT VBELN
       POSNR
       VGBEL
       VGPOS
       INTO TABLE ITAB1
       FROM LIPS
       FOR ALL ENTRIES IN ITAB
       WHERE VGBEL = ITAB-VBELN
         AND    VGPOS = ITAB-POSNR.
    ENDIF.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS  = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS  = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM       = SY-REPID
        I_CALLBACK_PF_STATUS_SET = 'PFSTATUS'
        I_CALLBACK_USER_COMMAND  = 'HANDLE_USER_COMMAND'
        IT_FIELDCAT              = IT_FIELDCAT
      TABLES
        T_OUTTAB                 = ITAB
      EXCEPTIONS
        PROGRAM_ERROR            = 1
        OTHERS                   = 2.
    IF SY-SUBRC  = 0.
    ENDIF.
    *&      Form  POPUP
          text
         -->P_EXTAB    text
    FORM POPUP USING P_EXTAB TYPE SLIS_T_EXTAB.
    "here double click on PFSTATUS and create the status, "activate, before that set PICK for choose(F2).
    *- Pf status
      SET PF-STATUS 'PFSTATUS'.
    ENDFORM.                 " POPUP
    *&      Form  HANDLE_USER_COMMAND
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM HANDLE_USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                                   RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          IF RS_SELFIELD-FIELDNAME = 'VBELN'.
            READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
            LOOP AT ITAB1 WHERE VGBEL = ITAB-VBELN
                              AND VGPOS = ITAB-POSNR.
              MOVE-CORRESPONDING ITAB1 TO IT_LIPS.
              APPEND IT_LIPS.
            ENDLOOP.
            PERFORM INTERACTIVE_REPORT.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "HANDLE_USER_COMMAND
    *&      Form  interactive_report
          text
    FORM INTERACTIVE_REPORT .
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-SELTEXT_L = 'VBELN'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 1.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-SELTEXT_L = 'ITEM'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 2.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'VGBEL'.
      X_FIELDCAT-SELTEXT_M = 'SO #'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 3.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'VGPOS'.
      X_FIELDCAT-SELTEXT_M = 'SO ITEM'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 4.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID
          IT_FIELDCAT        = IT_FIELDCAT1
        TABLES
          T_OUTTAB           = IT_LIPS
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
      IF SY-SUBRC  = 0.
      ENDIF.
    ENDFORM.                    " interactive_report
    Regards,
    Ranjita
    null

  • How to handle the selected record

    how to handle the selected record when using alv classes

    Hi,
    use method : get_current_cell                    
      CALL METHOD grid1->get_current_cell                    
                          IMPORTING es_row_id = ls_row_id     
                                    es_col_id = ls_col_id     
                                     e_value  = l_value.     

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

  • How to retain the hyperlinks when converting Word doc to PDF?

    For adobe acrobat 9 pro, I can't figure out how to keep the hyperlinks working. If I create pdf from word doc by save as, it can't embed fonts, but links work. If I use "print" in word, it embeds fonts, but some hyperlinks didn't work. What to do to keep fonts embedded and links working? It drove me crazy! HELP!!!

    Depends on the version of WORD. With OFFICE 2007, go to the Adobe menu and select Create PDF (this is PDF Maker). That will save the links. A similar process is needed for OFFICE 2003. With OFFICE 2010, you will have to upgrade to AA X or add them in Acrobat manually.

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • How to handle the control records in case of file to idoc scenario.

    Hi All,
    can you please clarify me how to handle the control records in case of file to idoc scenario.

    Hi,
    In File to Idoc scenario even though you selected apply control record values from payload and you are not getting those correct values which you have provided in the mapping.
    Also check the checkboxes Take sender from payload and Take receiver from payload along with the Apply control record values from payload checkbox
    Regards
    Seshagiri

  • How to handle the different pricing conditions changes in BI.

    Dear Friends
    can any one send me  Regarding
                    How to handle the different pricing conditions changes in BI.
    Thanks & Regards
    Ramana

    Hi,
    Take a look at the 0sd_o06 ODS and 2lis_13_vdkon datasource for sales billing conditions.
    http://help.sap.com/saphelp_nw70/helpdata/EN/36/8188408bc0bb4de10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/7f/0f8c4037fba62be10000000a1550b0/frameset.htm
    Regards.

  • How to handle the stale cheques in EBRS

    Dear Guru's
    Can any bady explain me how to handle the stale cheque cases in EBRS, and what are the possible transaction codes using for that.
    Any help can be greatly appreciated.
    Regards,
    kishroe

    Hi
    any bady know about this plz respond.
    Thanks in Advance
    kishore

  • How to handle the extended vo in the extended controller

    Hi,
    I want to know how to handle the extended vo attributes in the extended controller.
    I extended CompetenceElementsVO as 'CompetenceElementsEx' with 2 transient attributes called col1 and col2.
    Here i want to pass value according based on some condition. for this i want to know how to handle these attributes.
    I tried by using the extended vo name in the controller, if i use means then it is throwing error after the extended controller is implemented.
    Same time if i try to refer this attributes from the original vo definition, jdev itself showing error.
    please tell me how to handle this?
    Thanks in advance,
    SAN

    Hi San,
    You have to extend the controller where your region is associated with,
    And in that controller you get the AM(if there is more than one AM and your VO is associated with a child AM, first you have to get your required AM) and then
    get the ViewObject(standard).
    Then you should be able to get your newly added attributes.
    Please find the below sample code to get the AM handle and VO from there, update the code according to your requirement,
         Get all the VOs under the Root AM
         writeLog(pageContext, "Room AM"+ pageContext.getRootApplicationModule());
    String[] rootViewNames = pageContext.getRootApplicationModule().getViewObjectNames();
    /* writeLog(pageContext," Length of the VOs from Rootm AM "+rootViewNames.length);
    for (int j =0 ;j<rootViewNames.length ;j++ )
    writeLog(pageContext,j +" Value "+rootViewNames[j]);
         // Get requested AM from Root am
    public OAApplicationModule getRequestedAM(OAPageContext pageContext, String requestedAMName)
    writeLog(pageContext,"Requested AM called to check the AM "+requestedAMName );
    String amName = "";
    String objectivesAMName = requestedAMName;//"ObjectivesAM";
    String nestedAMArray[] = pageContext.getRootApplicationModule().getApplicationModuleNames();
    pageContext.writeDiagnostics(this,"Root AM=>"+pageContext.getRootApplicationModule().getName() + " Child AMs=>"+ nestedAMArray.length,1);
    OAApplicationModule currentAM = null;
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule();
    for(int i = 0; i < nestedAMArray.length; i++)
    amName = nestedAMArray;
    pageContext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule().findApplicationModule(amName);
                        //Get the view names
                   String[] viewNames = currentAM.getViewObjectNames();
    for (int i =0 ;i<viewNames.length ;i++ )
    writeLog(pageContext,i +" Value "+viewNames[i]);
    if(!(amName.indexOf(objectivesAMName)==-1))
    pageContext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
    break;
    return currentAM;
    Get the VO from the AM
    OAViewObject objAssessmentVO = (OAViewObject)yourAM.findViewObject("yourVO");
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • How to handle the call transaction in method of a custom business object

    Hello all,
    There is a custom report " RPTCORAPP" for approving leaves . As per my requirement i have develop a copy of leave workflow and for approval process i have call  "RPTCORAPP" in Custom method of custom object. i have made a transaction for this custom report for approving attendances. I am calling this method though call transaction statement within method.
    Problem: while approving the attendance workitem is not disappearing from the portal. Problem is due to call transaction statement.
                   once workitem come to the user, user click on it. control goes to the report, which display all the leave to approve on
                   the portal.
                   If after approving/ rejecting attendance user close the screen.workflow remain in the "process" status.Control wont come  back after call transaction statement in the method.
                 At the same time if user clicks on back button inspite of closing the screen. it is working fine. workitem disappears from the portal.
    How to handle the scenarion. if after approving/rejecting, i want the control to come back to the NEXT STATEMENT after call transactionstatement in my method.
    Please help it out........:)

    Hi swami,
    thanks for reply. but i am not using BDC in my method. iam just calling a custom transaction thriugh statement
    Call transaction 'ZHR_APPROVE_CLINOUT'. This transaction directly run the report RPTCORAPP and display all the request.

  • How to handle the table control in bapi?

    how to handle the table control in bapi? example va01.
    i pass multiple line item what is the procedure?
    header detail same .
    eample ship to party
           sale to party.
    line item mulptiple
    10 mat1
    2o mat2
    30 mat3.
    in bapi we can pass sinle line item.
    any way to handle multiple line item pass through the bapi.
    Message was edited by:
            Karthikeyan Pandurangan

    BAPI is not going through the screen flow logic so you need not to worry about the table control. Just check in the BAPi there must be one table parameter for line items just pass one int table with your data to that table parameter it will automatically update the tables.
    Regards
    shiba dutta

  • How to handle the #error in ssrs expression

    hi 
    Please any one help me to resolve this #error ,
    I have a calculated filed in that expression i given a if condition like below 
    data of column is coming like this 0 , 0.0 
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/( Fields!Column1.Value)))
    how to handle the #error 
    Please let me know any one 

    Hi deepuk23,
    According to your description, when you use the IIF() function in the report you got some error,right?
    The issue can be caused by the column1 and column2 have different datatype, I assumed that one is integer and another is float, when the Column1 is 0 or null,  because IIF() function always evaluates both the true part and the false part, even
    though it returns only one of them, it will throw out the error. 
    To resolve the issue, you should use a nested IIF() function to avoid the zero-divisor in any rate like below:
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/(IIF(Fields!Column1.Value=0,1,Fields!Column1.Value))))
    For more information, please refer to this article:
    FAQ: Why does the “Attempted to divide by zero” error still happen?
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to handle the errors in transformations

    Hi
    I am using SOA, JDev 10.1.3.3.
    How to handle the exceptions in transformations.
    If any thing goes wrong in transformation then how to handle that situation.
    I am not getting any kind of instances like errored out..
    Please help me out
    Regards
    Pavankumar

    I think your issue is that your process is going into manual recovery.
    In the console click on the tab BPEL processes. There is a link on the left for manual recovery. Do you see your processes there?
    What happens if you put your transformation into a scope. The in that scope you have a catch All. In this catch All routine just do a terminate. This will error your process but you should see it appear in the console.
    cheers
    James

  • How to handle the multiple line items in the Inbound idoc FM

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

Maybe you are looking for

  • Pattern matching program

    Hello, I am creating a program that does pattern matching on a video. I want the program to be able to open a template to be used for the pattern matching template and to allow the user to select a template from an image in Labview and then use this

  • IPTV Multicast address range

    Does anybody know what the multicast IP range is for Cisco IPTV? I need to setup an access-list to for an RP to be used just for IPTV.

  • Why can't i sync a tv show?

    I can't get Mad Men season 5 to sync from my PC to iPhone 4s. Both running the most up-to-date OS, and iTunes version. Any ideas?    

  • How to Start "System Services" in Bootcamp Windows 7

    Hi, I have a MBP running Windows 7 Pro 64 bit through Bootcamp. I am trying to install SolidWorks and iTunes and have been running into error messages that state that necessary services failed to start, check that you have permission. I have gone int

  • Chemin fonction noeud mathscript

    Bonjour, je voudrais utiliser le noeud mathscript ou noeud de script avec matlab (dans mathematiques->scripts et formules), c'est le même problème pour les deux. Voilà mon problème : je ne sais pas comment utiliser des fonctions dans ces noeuds que j