Abap fgs report

hi guru's,
     i have a problem with my code can anyone help me out with this,actually i am fetching invoice quantity from vbrp based on sales order (vbeln and posnr).actually i have 3 line items in sales order. but they invoce for this particular sales order is done seperately by dividing it into two. say in first invoice they have taken 3 quantity each from each line item and in second invoice they haive taken rest of it.so i need to get the invoice quantity updated each time the invoice is done for that particular sales order. i have written a code for it but the problem is i am getting all they invoce quantity in internal table it_vbrp but its moving only the first invoice item to final internal table it_final.please can anyone help me out with this code what statement i should write in this code to update my invoice quantity at end while moving it into final irrespective of invoice generated.my code is as follows, please help me out,
IF NOT IT_FINAL[] IS INITIAL.
           SORT IT_FINAL BY VBELN.
              SELECT FKIMG VBELN AUBEL POSNR  FROM VBRP INTO CORRESPONDING FIELDS OF TABLE IT_VBRP
                FOR ALL ENTRIES IN IT_FINAL WHERE AUBEL = IT_FINAL-VBELN.
           ENDIF.
        IF NOT IT_VBRP[] IS INITIAL.
          SORT IT_VBRP BY AUBEL POSNR.
            LOOP AT IT_FINAL.
              WA_TABIX = SY-TABIX.
                READ TABLE IT_VBRP WITH KEY AUBEL = IT_FINAL-VBELN  POSNR = IT_FINAL-POSNR BINARY SEARCH.
                   IF SY-SUBRC = 0.
                     IT_FINAL-FKIMG = IT_VBRP-FKIMG.
                     MODIFY IT_FINAL INDEX WA_TABIX TRANSPORTING FKIMG.
                   ENDIF.
            ENDLOOP.
        ENDIF.

Hi Abhinash, here's the code, you need to make some changes in the code which you had given initially.
hope this solves your issue.
<b>Do reward Points to all helpful answers.</b>
regards,
vikas
TABLES : vbap, vbak, vbkd, mbew , makt , mard.
TYPE-POOLS: slis.
INCLUDE icons.
DATA : BEGIN OF it_final OCCURS 0,
           vbeln LIKE vbap-vbeln,
           posnr LIKE vbap-posnr,
           matnr LIKE vbap-matnr,
           werks LIKE vbap-werks,
           kwmeng LIKE vbap-kwmeng,
           kdmat LIKE vbap-kdmat,
           waerk LIKE vbak-waerk,
           fkimg LIKE vbrp-fkimg,
           zterm LIKE vbkd-zterm,
           fkdat LIKE vbkd-fkdat,
           bstdk LIKE vbkd-bstdk,
           bstkd LIKE vbkd-bstkd,
           vsart LIKE vbkd-vsart,
           lddat LIKE vbep-lddat,
           bezei LIKE t173t-bezei,
           labst LIKE mard-labst,
           maktx LIKE makt-maktx,
           bqty LIKE vbrp-fkimg,
           status(4),
       END OF it_final.
DATA: BEGIN OF it_vbkd OCCURS 0,
       vsart LIKE vbkd-vsart,
       zterm LIKE vbkd-zterm,
       fkdat LIKE vbkd-fkdat,
       bstdk LIKE vbkd-bstdk,
       bstkd LIKE vbkd-bstkd,
       vbeln LIKE vbkd-vbeln,
       posnr LIKE vbkd-posnr,
      END OF it_vbkd.
DATA: BEGIN OF it_vbep OCCURS 0,
       lddat LIKE vbep-lddat,
       vbeln LIKE vbep-vbeln,
       posnr LIKE vbep-posnr,
      END OF it_vbep.
DATA: BEGIN OF it_mard OCCURS 0,
       labst LIKE mard-labst,
       matnr LIKE mard-matnr,
       werks LIKE mard-werks,
      END OF it_mard.
DATA: BEGIN OF it_makt OCCURS 0,
       maktx LIKE makt-maktx,
       matnr LIKE makt-matnr,
      END OF it_makt.
DATA: BEGIN OF it_vbrp OCCURS 0,
       aubel LIKE vbrp-aubel,
       posnr LIKE vbrp-posnr,
       fkimg LIKE vbrp-fkimg,
       vbeln LIKE vbrp-vbeln,
       vgbel LIKE vbrp-vgbel,       "NEW FIELD ADDED
      END OF it_vbrp.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat TYPE slis_fieldcat_alv,
      g_repid LIKE sy-repid,
      i_header TYPE slis_t_listheader.
DATA: gt_events TYPE slis_t_event,
      gt_list_top_of_page TYPE slis_t_listheader,
      g_status_set TYPE slis_formname VALUE 'PF_STATUS_SET',
      g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
      g_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE',
      g_top_of_list  TYPE slis_formname VALUE 'TOP_OF_LIST',
      g_end_of_list  TYPE slis_formname VALUE 'END_OF_LIST'.
DATA:wa_tabix LIKE sy-tabix.
INITIALIZATION.
  g_repid = sy-repid.
  SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
  SELECT-OPTIONS :  s_vbeln FOR vbap-vbeln.
  SELECTION-SCREEN:SKIP 2.
  SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
  PARAMETERS:    rad1 RADIOBUTTON GROUP rad ,
                 rad2 RADIOBUTTON GROUP rad DEFAULT 'X'.
  SELECTION-SCREEN END OF BLOCK b2.
  SELECTION-SCREEN : END OF BLOCK b1.
  PERFORM eventtab_build USING gt_events[].
*START-OF-SELECTION .
START-OF-SELECTION .
  PERFORM fetch_data .
  PERFORM built_fieldcat.
  PERFORM comment_build USING gt_list_top_of_page[].
  PERFORM display.
*END-OF-SELECTION.
END-OF-SELECTION.
*&      Form  FETCH_DATA
      text
-->  p1        text
<--  p2        text
FORM fetch_data .
  SELECT vbak~waerk
         vbap~vbeln
         vbap~posnr
         vbap~matnr
         vbap~kwmeng
         vbap~kdmat
         vbap~werks INTO CORRESPONDING FIELDS OF TABLE it_final
         FROM vbak INNER JOIN vbap ON vbakvbeln = vbapvbeln
                     WHERE vbak~vbeln IN s_vbeln.
  IF NOT it_final[] IS INITIAL.
    SORT it_final BY matnr.
    SELECT labst matnr werks FROM mard INTO CORRESPONDING FIELDS OF TABLE it_mard
      FOR ALL ENTRIES IN it_final WHERE matnr = it_final-matnr
                                    AND werks = it_final-werks.
  ENDIF.
  IF NOT it_mard[] IS INITIAL.
    SORT it_mard BY matnr.
    LOOP AT it_final.
      wa_tabix = sy-tabix.
      READ TABLE it_mard WITH KEY matnr = it_final-matnr BINARY SEARCH.
      IF sy-subrc = 0.
        it_final-labst = it_mard-labst.
        MODIFY it_final INDEX wa_tabix TRANSPORTING labst.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF NOT it_final[] IS INITIAL.
    SORT it_final BY vbeln posnr.
    SELECT vbeln posnr lddat FROM vbep INTO CORRESPONDING FIELDS OF TABLE it_vbep
      FOR ALL ENTRIES IN it_final WHERE vbeln = it_final-vbeln
                                    AND posnr = it_final-posnr.
  ENDIF.
  IF NOT it_vbep[] IS INITIAL.
    SORT it_vbep BY vbeln posnr.
    LOOP AT it_final.
      wa_tabix = sy-tabix.
      READ TABLE it_vbep WITH KEY vbeln = it_final-vbeln posnr = it_final-posnr BINARY SEARCH.
      IF sy-subrc = 0.
        it_final-lddat = it_vbep-lddat.
        MODIFY it_final INDEX wa_tabix TRANSPORTING lddat.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF NOT it_final[] IS INITIAL.
    SORT it_final BY matnr.
    SELECT maktx matnr FROM makt INTO TABLE it_makt
      FOR ALL ENTRIES IN it_final WHERE matnr = it_final-matnr.
  ENDIF.
  IF NOT it_makt[] IS INITIAL.
    SORT it_makt BY matnr.
    LOOP AT it_final.
      wa_tabix = sy-tabix.
      READ TABLE it_makt WITH KEY matnr = it_final-matnr BINARY SEARCH.
      IF sy-subrc = 0.
        it_final-maktx = it_makt-maktx.
        it_final-matnr = it_makt-matnr.
        MODIFY it_final INDEX wa_tabix TRANSPORTING maktx matnr labst.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF NOT it_final[] IS INITIAL.
    SORT it_final BY vbeln.
    SELECT fkdat vsart zterm bstkd bstdk vbeln posnr FROM vbkd INTO CORRESPONDING FIELDS OF TABLE it_vbkd
      FOR ALL ENTRIES IN it_final WHERE vbeln = it_final-vbeln
                                         AND vbeln IN s_vbeln.
  ENDIF.
  IF NOT it_vbkd[] IS INITIAL.
    SORT it_vbkd BY vbeln.
    LOOP AT it_final.
      wa_tabix = sy-tabix.
      READ TABLE it_vbkd WITH KEY vbeln = it_final-vbeln BINARY SEARCH.
      IF sy-subrc = 0.
        it_final-fkdat = it_vbkd-fkdat.
        it_final-vsart = it_vbkd-vsart.
        it_final-zterm = it_vbkd-zterm.
        it_final-bstkd = it_vbkd-bstkd.
        it_final-bstdk = it_vbkd-bstdk.
        MODIFY it_final INDEX wa_tabix TRANSPORTING fkdat vsart zterm bstkd bstdk.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF NOT it_final[] IS INITIAL.
    SORT it_final BY vbeln posnr.
    LOOP AT it_final.
      it_final-bqty = it_final-kwmeng - it_final-fkimg.
      IF it_final-bqty EQ 0.
        it_final-status = icon_green_light.
      ELSE.
        it_final-status = icon_red_light.
        MODIFY it_final INDEX wa_tabix TRANSPORTING bqty status.
      ENDIF.
      MODIFY it_final.
    ENDLOOP.
  ENDIF.
  IF NOT it_final[] IS INITIAL.
    DATA v_pos TYPE vbrp-posnr.
    SORT it_final BY vbeln posnr.
    SELECT fkimg vbeln aubel posnr vgbel FROM vbrp INTO CORRESPONDING FIELDS OF TABLE it_vbrp
      FOR ALL ENTRIES IN it_final WHERE aubel = it_final-vbeln.
  ENDIF.
  IF NOT it_vbrp[] IS INITIAL.
    SORT it_vbrp BY aubel posnr vgbel.
    LOOP AT it_vbrp.
      AT NEW aubel.
        CLEAR wa_tabix.
        CLEAR v_pos.
      ENDAT.
      READ TABLE it_final WITH KEY vbeln = it_vbrp-aubel
                                   posnr = it_vbrp-posnr.
                                            FKDAT = IT_VBRP-ERDAT BINARY SEARCH.
      IF sy-subrc = 0 AND v_pos < it_vbrp-posnr.
        it_final-fkimg = it_vbrp-fkimg.
        MODIFY TABLE it_final FROM it_final TRANSPORTING fkimg.
        wa_tabix = sy-tabix + 1.
      ELSE.
        it_final-fkimg = it_vbrp-fkimg.
        INSERT it_final INDEX wa_tabix.
        wa_tabix = wa_tabix + 1.
      ENDIF.
      v_pos = it_vbrp-posnr.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " FETCH_DATA
*&      Form  BUILT_FIELDCAT
      text
-->  p1        text
<--  p2        text
FORM built_fieldcat .
  wa_fieldcat-fieldname = 'POSNR'.
  wa_fieldcat-col_pos = '1'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Item No'.
  wa_fieldcat-key = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'VBELN'.
  wa_fieldcat-col_pos = '2'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'S.O Number'.
  wa_fieldcat-key = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'BSTKD'.
  wa_fieldcat-col_pos = '3'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Cust Po Number'.
  wa_fieldcat-key = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'BSTDK'.
  wa_fieldcat-col_pos = '4'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Cust Po Date'.
  wa_fieldcat-key = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'MATNR'.
  wa_fieldcat-col_pos = '5'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Mat.Number'.
  wa_fieldcat-key = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'MAKTX'.
  wa_fieldcat-col_pos = '6'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Mat Desc'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'FKDAT'.
  wa_fieldcat-col_pos = '7'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Date Needed By Cust'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'KWMENG'.
  wa_fieldcat-col_pos = '8'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Order Qty'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'FKIMG'.
  wa_fieldcat-col_pos = '9'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Inv Qty'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'BQTY'.
  wa_fieldcat-col_pos = '10'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Balance Qnty'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'LABST'.
  wa_fieldcat-col_pos = '11'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Stock Available'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'KDMAT'.
  wa_fieldcat-col_pos = '12'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Cust Mat.Number'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'LDDAT'.
  wa_fieldcat-col_pos = '13'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'Shipping Date'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'STATUS'.
  wa_fieldcat-col_pos = '14'.
  wa_fieldcat-tabname = 'IT_FINAL'.
  wa_fieldcat-seltext_l = 'STATUS'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
ENDFORM.                    " BUILT_FIELDCAT
*&      Form  DISPLAY
      text
-->  p1        text
<--  p2        text
FORM display .
  IF rad1 = 'X'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
     EXPORTING
  I_INTERFACE_CHECK              = ' '
  I_BYPASSING_BUFFER             =
  I_BUFFER_ACTIVE                = ' '
  I_CALLBACK_PROGRAM             = ' '
  I_CALLBACK_PF_STATUS_SET       = ' '
  I_CALLBACK_USER_COMMAND        = ' '
  I_STRUCTURE_NAME               =
  IS_LAYOUT                      =
       it_fieldcat                    = it_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
IMPORTING
  E_EXIT_CAUSED_BY_CALLER        =
  ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = it_final
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.
  ELSEIF rad2 = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
  I_INTERFACE_CHECK                 = ' '
  I_BYPASSING_BUFFER                = ' '
  I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = g_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                         =
       it_fieldcat                       = it_fieldcat
  IT_EXCLUDING                      =
  IT_SPECIAL_GROUPS                 =
  IT_SORT                           =
  IT_FILTER                         =
  IS_SEL_HIDE                       =
  I_DEFAULT                         = 'X'
       i_save                            = 'A'
  IS_VARIANT                        =
       it_events                         = gt_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                          = it_final
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.
  ENDIF.
ENDFORM.                    " DISPLAY
*&      Form  EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT
      text
-->  p1        text
<--  p2        text
FORM eventtab_build USING rt_events TYPE slis_t_event.
  DATA: ls_event TYPE slis_alv_event.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      i_list_type = 0
    IMPORTING
      et_events   = rt_events.
  READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
                           INTO ls_event.
  IF sy-subrc = 0.
    MOVE g_top_of_page TO ls_event-form.
    APPEND ls_event TO rt_events.
  ENDIF.
ENDFORM.                    "EVENTTAB_BUILD
*&      Form  TOP_OF_PAGE
      text
-->  p1        text
<--  p2        text
FORM top_of_page.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      i_logo             = 'LOGO'
      it_list_commentary = gt_list_top_of_page.
ENDFORM.                    "TOP_OF_PAGE
*&      Form  COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
      text
-->  p1        text
<--  p2        text
FORM comment_build USING lt_top_of_page TYPE slis_t_listheader.
  DATA: ls_line TYPE slis_listheader.
  CLEAR ls_line.
  ls_line-typ  = 'H'.
LS_LINE-KEY:  NOT USED FOR THIS TYPE
  ls_line-info = 'Finished Goods Report'.
  APPEND ls_line TO lt_top_of_page.
STATUS LINE: TYPE S
  CLEAR ls_line.
LS_LINE-TYP  = 'S'.
LS_LINE-KEY  = 'TEXT100'.
LS_LINE-INFO = 'TEXT101'.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
LS_LINE-KEY  = TEXT-103.
LS_LINE-INFO = TEXT-104.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
ACTION LINE: TYPE A
CLEAR LS_LINE.
LS_LINE-TYP  = 'A'.
LS_LINE-KEY:  NOT USED FOR THIS TYPE
LS_LINE-INFO = TEXT-105.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
ENDFORM.                    "COMMENT_BUILD
Message was edited by:
        Vikas Taneja

Similar Messages

  • Error 7 occurred at ABAPI Dist Report Read Link Info Error.vi - [.....] - RTBUIP_Build_Invoke.vi.ProxyCaller

    Hi all,
    I am on a field campaign with my Labview-controlled instrument. I wanted to make a small change to the code and build it again for uploading to a cFP-2020 Fieldpoint but the application builder stopped with the following error message:
    Error 7 occurred at ABAPI Dist Report Read Link Info Error.vi -> ABAPI Dist Cmp Settings to Disk Hier.vi -> ABAPI Get Settings From File2.vi -> ABAPI Get Settings From File.vi -> RTBEP_Invoke_Build_Engine.vi -> RTBUIP_Build_Invoke.vi -> RTBUIP_Build_Invoke.vi.ProxyCaller
    This is another computer than the one I used in the lab previously so might have forgotten to install something. I just copied the whole application folder with project file and subfolders
    to the Laptop I am using now. Labview version should be the same though (8.20).
    Any suggestions?
    Olaf

    Hello Olaf,
    This error is usually found when a subVI or a support file (DLL, custom control, etc)
    isn't able to be found by the application builder.  Possible reasons
    for this could include subVIs no longer located in their original
    paths and in need to be relinked, a DLL that isn't included in the build,
    and many other possibilities.
    You wrote that you copied the project from another PC, so it is very possible that some file went missing. Are all VIs in your project executable?
    You could try to mass compile all the VIs in your project and see if that helps.
    Regards,
    Johannes
    AE, NI Germany

  • ABAP list report, multiple selections - select-options

    I have written a very simple ABAP list report, that contains a single select-option.  On the selection screen, I have the option of entering multiple values, with each new value being displayed directly underneath the old, but I am only getting the first value entered on the screen displayed.  Does anyone have any sample code for me?

    Hi Daniel,
    Select_Options consists of 4 parameters, in with the range consists in eg...
    Select-options s_vbeln for vbak-vbeln.
    then s_vbeln-low, s_vbeln-high are the range values...
    So whne you write select query.
    write vbeln in s_vbeln
    instead of vbeln eq s_vbeln
    Hope this solves your problem.
    Thanks & Regards,
    Dileep .C

  • ABAP Custom Report (ALV Format) in Background Processing

    Hi
    I am not the hardcore ABAP Person. But want to know about the detail fact of the ABAP Custome Reports. The question is can we do the background processing for the ABAP Custome Report in ALV Format.
    If Yes ..do we require to have any additional Function/code to get the spool in ALV Format. I saw the comments that the output will look like the mess.
    Please share your comment or any useful documenation on this. We are in ECC 6.0
    Thanks in advance..and yes it will be rewared by points.
    Navin

    You can use alv's in background using docking containers, but the display wont be interactive. If you search the forum you will see tons of threads which talk about running ALV's in background.
    For the output to be interactive, you can run the report in foreground and do the data processing in background.
    Refer this link:
    Displaying ALV Grid in Background Job

  • How to write ABAP HR reports in ABAP web dynapro

    Hi All,
    How  to write ABAP HR reports in ABAP web dynapro? We can add HR REPORT CATEGORY in ABAP HR using logical database like PNP.How to add HR REPORT CATEGORY in ABAP Webdynapro ?
    Thanks.

    You can't use legacy concepts like logical databases directly in Web Dynpro ABAP.  Even if you could do so, you shouldn't.  Web Dynpro ABAP should always follow MVC - meaning that your business logic (the model) should be separated from WD as much as possible. This means calling function modules or class methods to consume the business logic and data.  So in general there should be no difference between building HR reports or any other type of report in WDA - since from the WDA side you are calling other objects to consume the data. 
    This probably does mean that you will need to create classes to expose the HR data that you want in your WDA.

  • Problem in displaying selection screen of a abap-hr report

    Hi,
    I have developed a abap-hr report in ver..6.2.I have used logical data base PNP for it.It was working fine.
    But when i migrate it into ver.4.6, I can see no selection screen for the report.
    How to get the selection-screen?
    Please help me through.
    Thanks in advance,
    Raj.
    Edited by: raj b on Feb 20, 2008 8:00 AM

    Hi Raj,
    Please check whether you have assigned any report category for the PNP selection screen in the version 6.2.
    The report category might not exist in the 4.6 version and that might be the reason the selection screen is not appearing.
    Cheers,
    Aditya

  • Nodes statement in payroll in SAP ABAP hr  Report

    hi,
      i am working in sap abap hr report for payroll.i am using nodes statement in that report.it is showing error that ""PERNR" is not a node of the logical database __S".how can i solve this error.in this report.          
    NODES pernr .
    INFOTYPES: 0000, 0001, 2001.
    TABLES: t554s, pcl1, pcl2.
    INCLUDE rpclst00.
    INCLUDE rpc2rx09.                      "Payroll results datadefns-Intl.
    INCLUDE rpc2rxx0.                      "Payroll results datadefns-Intl.
    INCLUDE rpc2rgg0.                      "Payroll results datadefns-GB
    INCLUDE rpcfdcg0.                      "Payroll results datadefns-GB
    INCLUDE rpcdatg0.
    INCLUDE rpc2cd00.                      "Cluster Directory defns.
    INCLUDE rpc2ps00.                      "Cluster: Generierte Schematas
    INCLUDE rpc2pt00.
    INCLUDE rpcfdc10.
    INCLUDE rpcfdc00.
    INCLUDE rpppxd00.
    INCLUDE rpppxd10.
    INCLUDE rpcfvp09.
    INCLUDE rpcfvpg0.
    INCLUDE rpppxm00.
    TYPES: BEGIN OF t_salrate,
        seqnr    TYPE pc261-seqnr,
        begda    TYPE p2001-begda,
        endda    TYPE p2001-endda,
        split(2) TYPE c,
        val      TYPE p DECIMALS 2,
       END OF t_salrate.
    DATA: it_salrate TYPE STANDARD TABLE OF t_salrate INITIAL SIZE 0,
          wa_salrate TYPE t_salrate.
    *Selection screen
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: so_awart FOR p2001-awart.
    SELECTION-SCREEN END OF BLOCK block1.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    GET pernr.
    get payroll results data
      rp-init-buffer.
      CLEAR rgdir. REFRESH rgdir.
      CLEAR rt. REFRESH rt.
      CLEAR: rx-key.
    set key to current pernr
      MOVE pernr-pernr(8) TO cd-key-pernr.
    retrieves payroll results for specific pernr(personnel number)
      rp-imp-c2-cd.
      IF rp-imp-cd-subrc = 0.                                "rgdir success
        rx-key-pernr = pernr-pernr.
        SORT rgdir BY seqnr ASCENDING.
        CLEAR rgdir.
      ENDIF.
      SORT rgdir BY fpbeg fpend ASCENDING seqnr DESCENDING.
    RGDIR the table where all payroll results periods are stored
      LOOP AT rgdir WHERE  abkrs IN pnpabkrs        "pay area
                      AND  srtza EQ 'A'
                      AND  void  NE 'V'.
        IF sy-subrc NE 0.
        set key to specific payroll results period(current RGDIR loop pass)
          UNPACK rgdir-seqnr   TO   rx-key-seqno.
        Retrieves data for specific payroll results period (current RGDIR
        loop pass)
          rp-imp-c2-rg.
        Loop at wpbp data for specific payroll results period
          LOOP AT wpbp.
            wa_salrate-seqnr = rgdir-seqnr.
            wa_salrate-begda = wpbp-begda.
            wa_salrate-endda = wpbp-endda.
            wa_salrate-split = wpbp-apznr.
          loop at rt data for specific payroll results period
            LOOP AT rt WHERE lgart EQ '/010' AND             "wage type
                             apznr EQ wpbp-apznr.            "payroll split
              wa_salrate-val = ( rt-betpe * ( wpbp-adivi / wpbp-kdivi ) ).
              APPEND wa_salrate TO it_salrate.
            ENDLOOP.
          ENDLOOP.
        Process BT table
          LOOP AT BT.
          ENDLOOP.
        Process NIPAY table
          LOOP AT NIPAY.
          ENDLOOP.
        etc................
        ENDIF.
      ENDLOOP.
    *END-OF-SELECTION.
    END-OF-SELECTION.

    Hi,
    Have you put a Logical Database in the attributes of the program that you have created ?
    Regards,
    Samson Rodrigues.

  • Report for time log on detail for each employees in SAP ABAP-HR report

    hi experts,
          please help me .how to create a report for time log on detail for each employees in SAP ABAP-HR report.please help me.
                                                      thank you

    Hi,
    For Time Management Infotypes , If you want to read the data using macro you need to use the Macro called RP_READ_ALL_TIME_ITY
    Example:
    DATA: BEGDA LIKE P2001-BEGDA, ENDDA LIKE P2001-ENDDA.
       INFOTYPES:  0000, 0001, 0002, ...
                         2001 MODE N, 2002 MODE N, ...
         GET PERNR.
       BEGDA = '19900101'. ENDDA = '19900131'.
       RP_READ_ALL_TIME_ITY BEGDA ENDDA.
       IF PNP-SW-AUTH-SKIPPED-RECORD NE '0'.
          WRITE: / 'Authorization for time data missing'.
          WRITE: / 'for personnel number', PERNR-PERNR. REJECT.
       ENDIF.

  • Font Size in ABAP List report

    Hi ,
    I want to know how to change font size in ABAP list report.
    I want to enlarge the font size.
    I have tried print control but it doesn't work.
    I have also tried line size and line count
    but it can only reduce the font size .
    Thanks.
    John

    Hi Kong,
    Try with following example:
    REPORT ZFONT NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65.
    NEW-PAGE PRINT ON.
    PRINT-CONTROL FUNCTION 'SF000'.
    WRITE: / 'This is CPI 20'.
    PRINT-CONTROL FUNCTION 'SF020'.
    WRITE: / 'This is CPI 6'.
    PRINT-CONTROL FUNCTION 'SF008'.
    WRITE: / 'This is CPI 12'.
    PRINT-CONTROL FONT 1 LPI 6.
    WRITE: / 'font 1 lpi 6'.
    PRINT-CONTROL FONT 2 LPI 6.
    WRITE: / 'font 2 lpi 6'.
    PRINT-CONTROL FONT 3 LPI 6.
    WRITE: / 'font 3 lpi 6'.
    End of print-control
    NEW-PAGE PRINT OFF.
    End of Program
    thnks
    Anurodh

  • Difference between Reports in normal ABAP and Reports in CRM

    Hi Experts,
    I am new to CRM. Can someone tell me the Difference between Reports in normal ABAP and Reports in CRM.
    It will be very useful if someone explains with example.
    Some where in SDN i read in CRM we should not select statment. Then how to fetch data?
    Please give me more basic concepts about CRM programming.
    Thanks,
    RAGU

    Hi Ragu,
    You can find much information at http://service.sap.com/crm-inst.
    Go to Installation & Upgrade Guides -> SAP Business Suite Applications -> SAP CRM
    Check the CRM version in which you are working and get the documents.
    FMs are specific to the requirement. Like all Business Partner related FMs generally start with BUPA* or BAPI_BUPA*.
    For CRM transaction data you can get info using FM CRM_ORDER_READ. To create a new transaction use CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE.
    More information can be fetched by surfing through the SDN threads and checking in SE37 t-code.
    Hope this helps!
    Regards,
    Saumya

  • How do we track back the ABAP queries/report painter used to custom report?

    Hi Experts,
    I only have some ideas about report painter and ABAP query. If a company has a number of different Z reports in production.
    1. How do we identify if it's report painter/writer or ABAP query??
    2. For ABAP query report, suppose that i can identify one. If i am given a Z tcode of that report and identify the program of that report behind it, How do i know what query that program belongs to?? What are the steps i go back in SQ03 to view that query??
    3. For report painter, starting from ztcode of the report, where do i check and track the original painter of that report??
    Please help clarify my doubts..
    Monica

    Hi Monica,
    For report painter/writer, you can identified it by go to
    Environment --> Technical information when you execute your Z-tcode.
    To refer back to the report painter/writer t-code you just need to double click oh the report group that you see by clicking the link above.
    Thanks,
    Victor.

  • ABAP QUERY REPORTS

    Hello Gurus'
    If any ABAP Query reports other then standard reports in MM pls give  like that reports.
    if any body come a cross developed reports thru abap query some thing is not possible thru standard reports in mm.
    Ian doing the project so i need like that reports pls help me boss.
    Regards
    Laxman

    Hi,
    If it is Indian Scenarios try to develop the reports like
    The Output of the Report should be like this.
    1) PRPOVendorMatrl Doc-Mvt typeSubcontracting challen Qty sendQty recievedQty pending
    2) PRPOQty- Price-GR-QtyIRQtyInvoice Amt
    3) Pending PRs,Pending POs, Pending GRs, Pending IRs
    4) J1ID table details in ALV GRID format
    Material excise details, output & input material number, Assessable value,
    rgds
    Chidanand

  • Including MANDT field in ABAP Query Report as output field

    Hi All,
    I need to display the client(MANDT) field in the ABAP Query Report as an output field.
    But in SQ01 where we select the fields to be displayed as output in query , this field is not visible.
    I later checked in the Infoset. Even in the infoset the field MANDT is greyed out and all other fields are active.
    Can someone tell me how to include the field MANDT in the output of the ABAP Query Report.

    self resolved

  • Is it possible to transport ABAP querys/ Report painter between systems

    Hi all
    Is it possible to transport ABAP querys/ Report painter object between one r/3 system and another ?

    Hi,
    Its possible to transport SAP Query (Global Area). When you save the infoset it will ask you to the request id for transport
    For SAP Queries in Standard area, there is a transport icon in the SQ02 screen which would transport it to required destinations
    thanks
    Sriram

  • ABAP QUERY Report : column number change

    Hi friends,
    I need to modify the existing ABAP QUERY REPORT.
    I have added a new field in the selection screen.
    When I execute the query, it(our new filed) is displaying at the end of the columns.
    But I want it to be at 8th columns. please help me.
    When I try to change the out position to "8"at "Basic list" -> select check box of our field and double clict it, I am getting the following error.
    Warning: Overlapping fields
    Those fields overlapped by other fields will not be displayed in their entirety.
    So I could not display the new field at 8 th column.
    Guys. Please help me.

    Hi
    You have to change the position of each field after 8th column
    suppose you added your new field at the 8th column position
    then all the subsequent fields positions you have to adjust as per their length
    You have to do like this to adjust the columns
    see the doc on query
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Step-by-step guide for creating ABAP query
    http://www.sappoint.com/abap/ab4query.pdf
    ABAP query is mostly used by functional consultants.
    SAP Query
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    Regards
    Anji

Maybe you are looking for

  • My iPad 2 camera is not working even after factory reset, what can I do??

    Ever since I've had an update for my iPad As I've had this for nearly 2 years now and I have tried everything to fix this camera, including a factory reset and nothing has worked.. Please help me!!

  • How to add image in pdf file

    Hello everybody, I need to place an image in pdf file programmatically on a specific location. Would you please help me what should I use to do this task? Thanks.

  • RFC to JDBC Sync Scenario and get JDBC response

    Hi All, We need to create RFC to JDBC synchronous interface with update_insert action. And we need to get the number of records updated or inserted as response and map the response and send it back to ECC as RFC response mesg. I have gone through the

  • How do I find my cerial number?

    Matthew, My iPod was stolen about a month ago and I have not yet reported it. I need to find my cerial number but I dont know how. People have gotten there iPhones stolen at my school and so far nothing has turned out. Matthew, Should I contact the p

  • Sharepoint 2010 farm Sql cluster

    hello, i have sharepoint farm with 3 server ( Web front , Sql , search server ) can i make sql cluster to sql with 3 sql server or it be must before begin install sharepoint farm thanks Nour