Doubt in ALV hr-abap report

hi all ,
    data is not displaying in the output..
here is the code :----
Type-pools  :  SLIS.
Tables      :  pernr.
InfoTypes   :  0006,     " Addresses
               0008,     " Basic Pay
               0009.     " Bank Details
Data       :  Begin of itab occurs 0,
               pernr type p0006-pernr,
               ort01 type p0006-ort01,
               pstlz type p0006-pstlz,
               land1 type p0006-land1,
               telnr type p0006-telnr,
               trfar type p0008-trfar,
               waers type p0008-waers,
               banks type p0009-banks,
               bankn type p0009-bankn,
               end of itab.
**Data        :  it_itab type standard table of itab initial size 0,
              wa_itab type itab.
Data        :  fieldcat type slis_t_fieldcat_alv WITH HEADER LINE,
               WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
               gd_layout      type slis_layout_alv,
               gd_prntparams  type slis_print_alv,
               gt_Event type slis_t_event,
               repid    like sy-repid.
Start-Of-Selection.
    Get Pernr.
    perform get_Data.
   perform build_layout.
    perform build_fieldcat.
    PERFORM DISPLAY.
*&      Form  get_Data
      text
-->  p1        text
<--  p2        text
FORM get_Data .
Provide pernr ort01 pstlz land1 telnr from p0006
               pernr trfar waers             from p0008
               pernr banks bankn             from p0009
               between pn-begda and pn-endda.
   MOVE :   P0006-pernr TO  wa_itab,
           p0006-ort01 TO  wa_itab,
           p0006-pstlz TO  wa_itab,
           p0006-land1 TO  wa_itab,
           p0006-telnr TO  wa_itab,
           p0008-trfar TO  wa_itab,
           p0008-waers TO  wa_itab,
           p0009-banks TO  wa_itab,
           p0009-bankn TO  wa_itab.
       WRITE : /   P0006-pernr ,
         p0006-ort01 ,
          p0006-pstlz ,
   p0006-land1 ,
         p0006-telnr,
        p0008-trfar,
         p0008-waers ,
        p0009-banks ,
        p0009-bankn.
        EndProvide.
          append wa_itab to it_itab.
          clear wa_itab.
ENDFORM.                    " get_Data
**&      Form  build_fieldcat
      text
-->  p1        text
<--  p2        text
FORM build_fieldcat .
   WA_FIELDCAT-TABNAME     = 'ITAB'.
    WA_FIELDCAT-FIELDNAME   = 'PERNR'.
    WA_FIELDCAT-SELTEXT_M   = 'PERSONAL NO.'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME     = 'ITAB'.
    WA_FIELDCAT-FIELDNAME   = 'ORT01'.
    WA_FIELDCAT-SELTEXT_M   = 'CITY'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME     = 'ITAB'.
    WA_FIELDCAT-FIELDNAME   = 'PSTLZ'.
    WA_FIELDCAT-SELTEXT_M   = 'POSTAL CODE'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME    = 'ITAB'.
    WA_FIELDCAT-FIELDNAME  = 'LAND1'.
    WA_FIELDCAT-SELTEXT_M  = 'COUNTRY'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME    = 'ITAB'.
    WA_FIELDCAT-FIELDNAME  = 'TELNR'.
    WA_FIELDCAT-SELTEXT_M  = 'TELEPHONE No.'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME    = 'ITAB'.
    WA_FIELDCAT-FIELDNAME  = 'TRFAR'.
    WA_FIELDCAT-SELTEXT_M  = 'COUNTRY'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME    = 'ITAB'.
    WA_FIELDCAT-FIELDNAME  = 'WEARS'.
    WA_FIELDCAT-SELTEXT_M  = 'CURRENCY'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME    = 'ITAB'.
    WA_FIELDCAT-FIELDNAME  = 'BANKS'.
    WA_FIELDCAT-SELTEXT_M  = 'BANK NAME'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
    WA_FIELDCAT-TABNAME    = 'ITAB'.
    WA_FIELDCAT-FIELDNAME  = 'BANKN'.
    WA_FIELDCAT-SELTEXT_M  = 'A/C No.'.
    APPEND WA_FIELDCAT TO FIELDCAT.
    CLEAR  WA_FIELDCAT.
ENDFORM.                    " build_fieldcat
*&      Form  DISPLAY
      text
-->  p1        text
<--  p2        text
FORM DISPLAY .
*REPID  = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
   I_INTERFACE_CHECK                 = ' '
   I_BYPASSING_BUFFER                = ' '
   I_BUFFER_ACTIVE                   = ' '
    I_CALLBACK_PROGRAM                =  REPID
   *    I_CALLBACK_PF_STATUS_SET          = ' '
   I_CALLBACK_USER_COMMAND           = ' '
   I_CALLBACK_TOP_OF_PAGE            = ' '
   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
   I_CALLBACK_HTML_END_OF_LIST       = ' '
   I_STRUCTURE_NAME                  =
   I_BACKGROUND_ID                   = ' '
   I_GRID_TITLE                      =
   I_GRID_SETTINGS                   =
   IS_LAYOUT                         =  gd_layout
    IT_FIELDCAT                       =  FIELDCAT[]
   IT_EXCLUDING                      =
   IT_SPECIAL_GROUPS                 =
   IT_SORT                           =
   IT_FILTER                         =
   IS_SEL_HIDE                       =
   I_DEFAULT                         = 'X'
   I_SAVE                            = ' '
   IS_VARIANT                        =
   IT_EVENTS                         =
   IT_EVENT_EXIT                     =
   IS_PRINT                          =
   IS_REPREP_ID                      =
   I_SCREEN_START_COLUMN             = 0
   I_SCREEN_START_LINE               = 0
   I_SCREEN_END_COLUMN               = 0
   I_SCREEN_END_LINE                 = 0
   I_HTML_HEIGHT_TOP                 = 0
   I_HTML_HEIGHT_END                 = 0
   IT_ALV_GRAPHICS                   =
   IT_HYPERLINK                      =
   IT_ADD_FIELDCAT                   =
   IT_EXCEPT_QINFO                   =
   IR_SALV_FULLSCREEN_ADAPTER        =
IMPORTING
   E_EXIT_CAUSED_BY_CALLER           =
   ES_EXIT_CAUSED_BY_USER            =
   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.
ENDFORM.                    " DISPLAY

Check this out if it works;
Note  : I_EMP is the table with header line
Define Type Pool
TYPE-POOLS: SLIS.
DATA : alv_fieldcat TYPE slis_t_fieldcat_alv,
             w_sort TYPE slis_t_sortinfo_alv,
             gs_sort TYPE slis_sortinfo_alv,
             alv_layout TYPE slis_layout_alv.
  alv_layout-colwidth_optimize = 'X'.
  PERFORM fieldcat_init USING alv_fieldcat.
  ws_repid = sy-repid.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            i_callback_program = ws_repid
            is_layout          = alv_layout
            it_fieldcat        = alv_fieldcat
       TABLES
            t_outtab           = I_EMP
       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 fieldcat_init USING p_fieldcat TYPE slis_t_fieldcat_alv.
  DATA: ls_fieldcat TYPE slis_fieldcat_alv.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname = 'PERNR'.
  ls_fieldcat-tabname = 'I_EMP'.
  ls_fieldcat-col_pos = 1.
  ls_fieldcat-seltext_m = 'Employee Number'.
  APPEND ls_fieldcat TO p_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname = 'TEMP_NUM'.
  ls_fieldcat-tabname = 'I_EMP'.
  ls_fieldcat-col_pos = 2.
  ls_fieldcat-seltext_m = 'Temp.Emp No.'.
  APPEND ls_fieldcat TO p_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname = 'KOSTL'.
  ls_fieldcat-tabname = 'I_EMP'.
  ls_fieldcat-seltext_m = 'Cost Center'.
  ls_fieldcat-col_pos = 5.
  APPEND ls_fieldcat TO p_fieldcat.
ENDFORM.

Similar Messages

  • Conversion of the ABAP Report (ALV based) into BSP Application

    Hello Friends,
    I tried to convert the abap report into a bsp application. I have followed all the steps mentoined in the previous threads regarding this topic.
    I have created a simple Z report in CRM, that displays the business partner details from the table BUT000 based on the partner entered. Partner is the input given to this report. I have defined the partner field in PARAMETERS.
    Now I have written all the code in the onInitialization of the BSP Page looking at the previous threads and also in the layout of the page.
    submit ZTEST_PARTNER
    exporting list to memory and return
    with p_part = 'HR10079430'.
    and also the rest of the code.
    It is working fine. The BSP page is displayed with all the Business Partner details.
    Now the problem is I have another Z report that displays the result in the ALV grid. The report uses the Function Module REUSE_ALV_GRID_DISPLAY to display the output.
    If I use the same method above this is giving a dump, I mean it says the page cannot be displayed.
    So, how should I use the above method to convert the ALV Grid based Z report into a BSP Application.
    Please give your suggestions.
    Thanks & Regards,
    Raju.

    you cannot .
    even if you use a normal report to
    submit the alv grid report
    exporting list to memory and return
    it will show the alv on screen and will nt just export the list to memory.

  • Classical List to ALV format in sap abap report

    Hi All,
    I have a requirement to change the existing abap report in which teh output is dispalyed in classical list format.
    I want to convert this list report output into ALV format.
    COuld anyone please help me how to convert this from Classical list to ALV format?
    Thanks,
    Komal.
    Moderator message: sorry, this not the place to teach the basics, please search for available information. If you understand the classical list and how to use ALV, then you can also do the transfer yourself.
    Edited by: Thomas Zloch on Aug 12, 2011 4:44 PM

    This will be very difficult for you.....
    Since you are getting a time out error....it looks like, you are runnning this report in foreground....................
    Try running it in background it will work...
    ELSE....you have to fetch in small chunks....but the question is how will you do it. Since the USR02 only has BNAME as primary key...
    Either put the BNAME as part of selection screen and fetch the data.....it will solve your problem....
    Only fetch for those BNAME which is entered in the selection screen...
    Hope it helps!

  • How to Call another screen using the ABAP Report which is displaying ALV ou

    Hello All,
    I am developing a ABAP report in which I want to transfer the stock from material to another material.
    My Report will include 3 to screens.
    The first sleection screen will display all the material with their stock value.
    When we execute the report I will get the list of materials along with their current stock. On the top of the output screen I want the Execute button. Also , each line of the output should have checkbox or the ALV provides the functionality of editing one cell like that.....Once the user tick the checkbox or the cell....then I want to move to another screen where user can enter the Quantity and then user will tick ok and then I will call one function module so that the material documnet is posted and transfer of posting form material to material is done successfully.
    Could anyone please help me out how to call another screen from the output screen where user can enter the Quantity amount....
    I dont want to use the Dialog programming.....I want to create the simple ALV Abap report.
    Regards,
    Komal Bhutada.

    Hi Raymond,
    Thanks for the input...I will try this in my code .....
    Can you please help me how to insert the checkbox in the ALV Output....so that I can select one of row and then press execute to process further?..
    Thanks for the information.
    Regards,
    Komal.

  • OO ABAP Report without ALV

    Hi All,
    I am a beginner to OO Abap & Looking for some real examples like declaring Internal tables ,using classes as parameters for methods etc.
    Can Some one Post some ABAP reports regarding MM as Examples using OO ABAP.
    Regards,
    Ravi S

    Hi,
    Check the following code:
    TABLES : VBAK,VBAP.
    TYPES : BEGIN OF ST_VBAK,
              VBELN TYPE VBAK-VBELN,
              ERDAT TYPE VBAK-ERDAT,
              AUDAT TYPE VBAK-AUDAT,
              VBTYP TYPE VBAK-VBTYP,
              AUART TYPE VBAK-AUART,
            END OF ST_VBAK.
    TYPES : BEGIN OF ST_VBAP,
              VBELN TYPE VBAP-VBELN,
              POSNR TYPE VBAP-POSNR,
              MATNR TYPE VBAP-MATNR,
              MATKL TYPE VBAP-MATKL,
              ARKTX TYPE VBAP-ARKTX,
              PSTYV TYPE VBAP-PSTYV,
            END OF ST_VBAP.
    TYPES : BEGIN OF ST_FINAL,
            VBELN TYPE VBAK-VBELN,
            POSNR TYPE VBAP-POSNR,
            ERDAT TYPE VBAK-ERDAT,
            AUDAT TYPE VBAK-AUDAT,
            VBTYP TYPE VBAK-VBTYP,
            AUART TYPE VBAK-AUART,
            MATNR TYPE VBAP-MATNR,
            MATKL TYPE VBAP-MATKL,
            ARKTX TYPE VBAP-ARKTX,
            PSTYV TYPE VBAP-PSTYV,
            END OF ST_FINAL.
    SELECT-OPTIONS : S_VBAK FOR VBAK-VBELN.
    CLASS SALES1 DEFINITION.
    PUBLIC SECTION.
    METHODS : GET_DATA,
              POPULATE_DATA,
              DISPLAY_DATA.
    DATA : IT_VBAK TYPE STANDARD TABLE OF ST_VBAK,
           IT_VBAP TYPE STANDARD TABLE OF ST_VBAP,
           IT_FINAL TYPE STANDARD TABLE OF ST_FINAL,
           WA_VBAK LIKE LINE OF IT_VBAK,
           WA_VBAP LIKE LINE OF IT_VBAP,
           WA_FINAL LIKE LINE OF IT_FINAL.
    ENDCLASS.
    CLASS SALES1 IMPLEMENTATION.
    METHOD GET_DATA.
    SELECT VBELN ERDAT AUDAT VBTYP AUART FROM VBAK INTO
    TABLE IT_VBAK WHERE VBELN in S_VBAK.
    IF NOT IT_VBAK[] IS INITIAL.
    SELECT VBELN POSNR MATNR MATKL ARKTX PSTYV FROM VBAP
            INTO TABLE IT_VBAP
            FOR ALL ENTRIES IN IT_VBAK
            WHERE VBELN = IT_VBAK-VBELN.
    ENDIF.
    ENDMETHOD.
    METHOD POPULATE_DATA.
    LOOP AT IT_VBAK INTO WA_VBAK.
    READ TABLE IT_VBAP INTO WA_VBAP WITH KEY VBELN = WA_VBAK-VBELN.
    IF SY-SUBRC = 0.
    WA_FINAL-VBELN = WA_VBAK-VBELN.
    WA_FINAL-POSNR = WA_VBAP-POSNR.
    WA_FINAL-ERDAT = WA_VBAK-ERDAT.
    WA_FINAL-AUDAT = WA_VBAK-AUDAT.
    WA_FINAL-VBTYP = WA_VBAK-VBTYP.
    WA_FINAL-AUART = WA_VBAK-AUART.
    WA_FINAL-MATNR = WA_VBAP-MATNR.
    WA_FINAL-MATKL = WA_VBAP-MATKL.
    WA_FINAL-ARKTX = WA_VBAP-ARKTX.
    WA_FINAL-PSTYV = WA_VBAP-PSTYV.
    APPEND WA_FINAL TO IT_FINAL.
    ENDIF.
    ENDLOOP.
    ENDMETHOD.
    METHOD DISPLAY_DATA.
    LOOP AT IT_FINAL INTO WA_FINAL.
    WRITE :/ WA_FINAL-VBELN ,
             WA_FINAL-POSNR ,
             WA_FINAL-ERDAT,
            WA_FINAL-AUDAT ,
            WA_FINAL-VBTYP ,
            WA_FINAL-AUART ,
            WA_FINAL-MATNR ,
            WA_FINAL-MATKL ,
            WA_FINAL-ARKTX ,
            WA_FINAL-PSTYV .
    ENDLOOP.
    ENDMETHOD .
    ENDCLASS.
    START-OF-SELECTION.
    DATA : OBJ TYPE REF TO SALES1.
    CREATE OBJECT OBJ.
    CALL METHOD OBJ->GET_DATA.
    CALL METHOD OBJ->POPULATE_DATA.
    CALL METHOD OBJ->DISPLAY_DATA.
    Regards,
    Bhaskar

  • How to show Headers in ABAP report

    hii folks,
    plz try to solve my quesions:
    hw to show  two Headers in ABAP report output, like
    eg:
    for first two fields(vendor  A/C no. vendor name ) i have to shw header name like VENDOR  PR. DETAILS & for the nxt following fields(vendor city, state, country)i have to shw VENDOR ADDRESS.(plz gv a exaple)
    2Q) A  INISILIZATION event in report hw many times it triggers.
    3Q) In a ALV report once i double click on a selected record it has to shw its corresponing details.for(DOUBLE CLICK what we use & where i have to defind it)
    thanking u
    sweta.

    1. Please let me know whether it is for Classic list report or ALV.
    2. Initilization is triggered only once when the report is loaded to memmory.
    3.
    3.1.) Declare user_command in events:
    DATA: ls_event type slis_alv_event.
    move 'USER_COMMAND' to ls_event-form.
    append ls_event to gt_events.
    3.2.) Getting cell value ." within the form USER_COMMAND:
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    Check function code
    CASE R_UCOMM.
    WHEN '&IC1'. "--> check your own sy-ucomm once you double click the line item
    Check field clicked on within ALVgrid report
    IF RS_SELFIELD-FIELDNAME = 'EBELN'.
    Read data table, using index of row user clicked on
    READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
    ENDIF.
    ENDCASE.
    ENDFORM.
    For More details, please refer to following threads.
    Re: Drill down report
    double click on cell in alv report
    Regards,
    Lijo Joseph
    *reward if useful

  • How to port a ABAP report into ITS? Please help!

    Hi Experts,
              I have a ABAP report that contains a selection screen with 3 select-option elements and a search button. On pressing search button an ALV grid opens with data from a SAP table based on selection screen criteria.
    I want to web enable it so that it can be accessed from Enterprise Portal. i will be using IAC iview in Portal.
    Now the IAC iview needs my ABAP report to be ported to ITS?
    1.How to port it to ITS? What are the steps?
    2.In order to port in to ITS do I need to change my ABAP code?
    3.Are there any known limitations of porting ABAP reports in ITS? For example Performance, ALV not supported, Table control not supported etc.
    4. Does it handle dynamic programming?
    5. Are there any documentation for porting report to ITS?
    6. How much time effort it will be for porting ABAP reportys to ITS?
    To add some more points. SAP transaction iview is not allowed in my organization. Webdynpro/BSP is also not supported. Thats why I am using IAC iview which needs ITS.
    Please help
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    hi,
      step1.create a transaction for ABAPreport in SE93.
      step2.Go to transaction SICF and create a service in the following path sap/bc/gui/sap/its.
    Check the following Url to create a service.
    /people/durairaj.athavanraja/blog/2005/08/21/running-your-first-its-webgui-application-in-sap-netweaver-04-abap-edition--nsp
      step3. create a system object setting the following property categories.
       1.Connector
       2.Usermanagement
       3.ITS
       4.WAS
    In the usermanagement do the user mapping.
    step4. While creating  an IAC iview, in the third step for the <b>Internet Application Component (IAC)</b> property give the service name you have created in SICF.
    you need not change the abap code. The only limitation while porting abap report in ITS is you cannot view the icons in the tool bar, instead you view the buttons.
    ALV is supported. Functionality wise nothing will change except the appearance mainly with the icons.
    Regards,
    Gopi

  • XML file to ABAP report..gidance needed on approach

    Hello All,
    We have an existing ccBPM enabled interface between SAP-ECC and a 3rd party via PI. Currently after all the to-and-fro processing, 3rd party sends an XML FINAL-RESPONSE-FILE to PI, which resides on a folder in PI server. ( Interface ends here)
    Now the requirement is that we need to enhance this interface or create a new one which would pick the XML FINAL_RESPONSE_FILE and format the XML data and present it in user-friendly form in terms of a report /alv.
    What I want to know is:
    1> Should we enhance the existing interface and ccBPM to wait for this final-response file to come and then trigger some BAPI or maybe a proxy to send this data to ECC for further processing.
    OR
    2> Should we create a sepaarte interface which picks this file asynchronously and sends to ECC for further processing.
    OR
    3> Should a create an ABAP report, which would pick this file from PI server and format the data and create an report out of it. ( Here I assume SAP must be havinga  fm to convert XML to some internal table readable format)...please advise if there is such an FM.
    OR
    4> Is there any better approach for my scenario - I am a newbie in ccBPM.
    Many thanks
    Shirin

    Hi,
    1> Should we enhance the existing interface and ccBPM to wait for this final-response file to come and then trigger some BAPI or maybe a proxy to send this data to ECC for further processing.
    No...if you are planning to make the ccBPM wait then avoid this design...it will keep on utilising system resources till the response gets back...
    OR
    2> Should we create a sepaarte interface which picks this file asynchronously and sends to ECC for further processing.
    you can try this one.....rather I would have tried this one:)
    If you have a guarentee that the response will come within a stipulated time-period (say X secs...not very large) and if you are not supposed to create a new interface...then go for change in BPM
    Regards,
    Abhishek.

  • HR ABAP Report: Display employee details changes within a time period!!

    Dear Friends,
    I need urgent help with the below HR-ABAP report.
    Thanks in Advance!
    Joy
    I have to create a report which would display in ALV
    A table containing details of all changes to fields specified iby the user within the selected period
    Details :: ~
    When executing the report, the user will be given the opportunity to select which fields will be displayed in the output of the employee changes table. They will also be given the choice to display the previous value for each field and the date the change becomes effective.
    Please Help !!!

    First of all ensure that the fields that you need to audit have been configured.
    refer to the  documentation of report RPUAUD00.
    You will need to create a report that extracts data fromPCL4.
    If your audit data has been configure as Lond documents then look at using FM HR_INFOTYPE_LOG_GET_LIST  &
    HR_INFOTYPE_LOG_GET_DETAIL
    If not you will to extract the header info & then the BELEGE info - beware of the differnt operas inuse.
    J

  • How to filiter in abap report

    Hi Frds
    I have created abap report ,in selection screen Project,year,period and Company code is given.Now the end user asking me to restrict the output of the report based on company code which we giving in selection screen..
    For Example:
    User1          150 (Company code)
    User2          160 (Company code)
    User3          170 (Company code)
    User4          180 (Company code)
    the user1 should able run only 150 company code report outputs only,if he gives company code other then 150 ,the error message should raise .Like this for all user .
    The user must run only his company code related projects.
    Thanks
    By
    Pari

    hi,
    how do you identify different users,
    if you can identify the users..
    you can sort and group the table by company code.
    Then based on the condition you can pass the data to the alv
    Any way fieldcatalog is same for all the structure.
    It is just the structure you pass is the different.
    So group the table.
    Append the data of that particular company code to different and merge that with field catalog..
    This is a rough solution what i have in mind.
    Hope this might help you..
    Thank you.

  • RESERVE command alternative in ABAP report

    We have a requirement to print article pricing data on a report (simple list, not ALV or SAP Script). If data for the next article does not fit on the remaining lines of the current page then a new page should be started. I know we can use the RESERVE command but this means working out how many lines the next article will use. Is there anything like the PROTECT/END PROTECT command used in SAP Script that we can use in the ABAP report? Or can anyone suggest another way?
    Regards

    I don't think there is anyway around this other than to count the number of lines for the article before starting to print and throw a new page if necessary. I was hoping to avoid doing this as counting the number of print lines for an article will be quite involved.
    I think what I shall do is collect all required data for an article and then call a print routine. The print routine shall be called twice, the first time it shall not print the data but count each line that would be printed. On return from the first call to this routine I shall have available the total number of print lines for the article. Now I shall do a NEW-PAGE if needed and call the print routine a second time to actually print the data.
    Each WRITE command in the print routine shall have to take the form:
    IF print_on.
      WRITE:/ ......
    ELSE.
      ADD 1 TO g_total_print_lines_for_article.
    ENDIF.
    The overhead to calling the print routine twice shall not be that great as all the data will already have been collected prior to the first call.
    Messy but necessary I guess.
    Cheers

  • Regarding curves IN abap REPORT

    hi experts,
    i got one assignment ,i have to show the graphical representaton of the output data in the abap report,
    i have to create  the bell curve on the basis of appraisal data which will come in the output how will i proceed for this plz help me remember i have to create this only with the help of abap report or alv report plz  help me considering this point .
    how will i create x axis ,y axis or any bell curve plz throw light ,it will be fruitful for u also as this things we have make it possible without BI but only ABAP.
    plz help me if possible send me the codes or guide me.

    Hi ,
    To start with X and Y axis u can refer the fm GRAPH_2D  to illustrate  the x and y axis .
    There is another FM GRAPH_3D ..
    I have never tried with curve plotting but yielded the o/p in bargraphs .
    Br,
    Vijay

  • Bex Query in ABAP report

    Can i call a BEx query in ABAP report and display in ALV grid. if so please give me the syntax.
    Thanks
    Akila.R

    Look at the FM "RSDRI_INFOPROV_READ".
    With this you can read data into a internal table of your program.
    With this FM, you can do a selective read and select only the key figures and characteristics that you wish to read in your ABAP.
    I am not ure, if you can call a BEx report in your ABAP. But with what I mentioned here, you can acheive what you want.
    Ravi Thothadri

  • *bold* Doubt in alv

    Hi friends i am new to sap.
    I have a querry in alv.In this  report i only get 3 columns in the output [fname,dept and age] whereas location ,eid doesn't comes.i
    tried to increase the occurs 5 to 10 ,but it did't worked .
    Any suggestion please ??
    REPORT zalvreport .
    TABLES: zemp.
    DATA: BEGIN OF t_report OCCURS 5,
    name LIKE zemp-fname,
    age LIKE zemp-age,
    deprt LIKE zemp-dept,
    local LIKE zemp-location,
    empid like zemp-eid,
    END OF t_report.
    TYPE-POOLS: slis.
    DATA t_fcat TYPE slis_t_fieldcat_alv.
    DATA: d_repid LIKE sy-repid.
    SELECT-OPTIONS: s_name FOR zemp-fname .
    START-OF-SELECTION.
      SELECT * FROM zemp WHERE fname IN s_name.
        MOVE: zemp-fname TO t_report-name,
              zemp-age TO t_report-age,
              zemp-location to t_report-local,
              zemp-dept TO t_report-deprt,
              zemp-eid TO t_report-empid.
        APPEND t_report.
      ENDSELECT.
      IF sy-subrc NE 0.
        WRITE 'No data found'.
        EXIT.
      ENDIF.
      d_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name         = d_repid
                i_internal_tabname     = 'T_REPORT'
                i_inclname             = d_repid
             CHANGING
                ct_fieldcat            = t_fcat
           EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
      IF sy-subrc <> 0.
        WRITE: / 'Error:',sy-subrc,
        'when Create Field Catalog'.
        EXIT.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program = d_repid
                it_fieldcat        = t_fcat
           TABLES
                t_outtab           = t_report
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
      IF sy-subrc <> 0.
        WRITE: / 'Error:',sy-subrc,
        'when Call ALV List Display'.
        EXIT.
      ENDIF.

    hi lokesh
    here is some information for the FM   'REUSE_ALV_FIELDCATALOG_MERGE'
    Create field catalog from dictionary structure or internal table
    Supports the creation of the field catalog for the ALV function modules based either on a structure or table defined in the ABAP Data Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for rapid prototyping since the following restrictions apply:
    Performance is affected since the code of the table definition must always be read and interpreted at runtime.
    Dictionary references are only considered if the keywords LIKE or INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields are output in the list by default whereas the remaining fields are only available in the field selection.
    If the field catalog is passed with values, they are merged with the 'automatically' found information.
    so it will be better for u if u create Field catalog manually as described above in this u have more hold of catalog creation
    Cheers
    Snehi Chouhan

  • Displaying ABAP report on a web browser

    Hi,   I want to develop a code for displaying ABAP report on a web browser.

    Hi Rao,
    Are you looking for running ABAP report from portal / WDA?
    There are lot of similar threads available on SCN: to run ABAP report in WDA.
    Calling a TCODE PA60 from Web dynpro ABAP
    Call TCode MM02 from ALV
    Please search in SCN, hope you may find many threads.
    Regards,
    Rama

Maybe you are looking for

  • Windows XP OS hangs on start up - Satellite P105

    From day of purchase my operating system would boot straight to windows. This Tech jerk from HP did a remote so that I could print wireless. He changed settings that I had to fix but, the one I have now I can not. When computer starts up now I get a

  • Different Factories for MSI mobos, Could it be the problem???

    Hi, just an idea... Could it be that all of a line of production of MSI 875P NEO Fis2r, LSR got damaged and all the line of boards (coming from that factory, coming from that country) are arriving to our hands??? ?(  ?(  ?( Could it be that there are

  • I want to throw this Ipod!

    My Ipod is sick the only thing it does is charge when plugged into the computer but thats all it does. No updating at all. My computer does not see it as hardware and itunes doesn't see it either. Someone help please. I have tried everything and spen

  • No text is displaying in iTunes 11

    I recently upgraded to iTunes 11.  I'm running Windows XP Pro and have never had an iTunes problem before this. No text of any kind is displaying in the program.  For example, if I expand an album, and I scroll over the area,  I can see a highlight o

  • Creating a package in sql*plus

    Dear all; Do you know what is wrong with this statement SQL> create or replace pkg_initial_comment as procedure save_initial_comment(p_i d number, p_first_name varchar2, p_last_name varchar2, p_comment varchar2, p_dat e date); end save_initial_commen