Non ALV

hi all
am using the below statement using an ALV am getting the desired output but am using the below statements for a non-ALV  report the first select statememnt that i mentioned below is executing and retreving the data but the second select statement is not getting executed in a non ALV report.please help.
FORM get_data_from_vbak.
<b><u>First Select statement</u></b>
SELECT vbeln netwr ernam audat bstnk auart
FROM VBAK into TABLE it_vbak
      where kunnr IN s_kunnr and
      vkorg eq p_vkorg and
      vtweg EQ p_vtweg AND
      spart EQ p_spart AND
      AUART NE 'ZLP'.
if sy-subrc eq 0.
if s_matnr = it_vbap-matnr.
<b><u>Second Select statement</u></b>
SELECT matnr posnr werks FROM vbap
into table it_vbap
FOR ALL entries in it_vbak
where vbeln = it_vbak-vbeln
and matnr = it_vbap-matnr.
endif.
endif.

hi
As per ur requirement these two statement are related. If you get some data in first select statement (it_vbak) then only u have to fetch data through second select statement if i am not wrong. First you are writing condition IF SY-SUBRC eq 0. That is ok. In nested if again you are writing one IF condition like "if s_matnr = it_vbap-matnr". Before fetching data from second select statement (it_vbap) u are checking this condition. So always it should fail. So it should not go at all in second select statement. so remove that condition and write it after second select statement.
Reward if it dose
Thanks
Siva Kumar

Similar Messages

  • How many lines we can print using Non-alv report list ?

    Hi Experts,
    How many lines we can print using Non-alv report list ?
    regards
    vishnu

    Hi,
    It depends on the page size according to the page size we can set the no. of lines as follows,
    REPORT  program_name   NO STANDARD PAGE HEADING
    LINE-SIZE 290
    LINE-COUNT 65.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Can we control Font and Font size in Non-alv report list ?

    Hi Experts,
    Can we control Font and Font size in Non-alv report list ?
    Regards
    vishnu

    Hi,
    see if this is useful to you,
    PRINT-CONTROL SIZE 2 COLOR BLACK FONT 5.
    you can go through this link,
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba62335c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Abhijit G. Borkar

  • Dynamic columns in report... NON ALV REPORT

    Hey Guys,
    I have a internal table which has abt 50 columns now i wanna show only the columns that have any value in it...
    Now this is not an ALV report... this is a basic report....
    So anyideas as to where i can start  on this.... i dont want to write if conditions...
    i am tryin to make this as elegent as possible...
    all help will be appreciated
    Thanks

    Hi,
    Try this..
    In this example..I have an internal table with the columns MATNR, WERKS, LGORT & MENGE...The ITAB is having value only for matnr and werks..It will print only MATNR and WERKS in the output..
    <b>* Data declarations.</b>
    DATA: BEGIN OF itab OCCURS 0,
            matnr  TYPE matnr,
            werks  TYPE werks_d,
            lgort  TYPE mard-lgort,
            menge  TYPE ekpo-menge,
          END OF itab.
    DATA: BEGIN OF itab_desc OCCURS 0,
            compname(30),
            text(20),
          END OF itab_desc.
    DATA: v_repid TYPE syrepid.
    DATA: t_comp  LIKE rstrucinfo OCCURS 0 WITH HEADER LINE.
    FIELD-SYMBOLS: <fs>.
    DATA: t_allowed_fields(30) OCCURS 0 WITH HEADER LINE.
    <b>* Program.</b>
    v_repid = sy-repid.
    <b>* Sample data.</b>
    itab-matnr = 'TEST'.   itab-lgort = '0001'.APPEND itab.
    itab-matnr = 'TEST12'. itab-lgort = '0001'.APPEND itab.
    itab-matnr = 'TEST123'.itab-lgort = '0001'.APPEND itab.
    <b>* Store the columns texts.</b>
    itab_desc-compname = 'MATNR'. itab_desc-text = 'Material'.
    APPEND itab_desc.
    itab_desc-compname = 'WERKS'. itab_desc-text = 'Plant'.
    APPEND itab_desc.
    itab_desc-compname = 'LGORT'. itab_desc-text = 'Sto. Loc'.
    APPEND itab_desc.
    itab_desc-compname = 'MENGE'. itab_desc-text = 'Quantity'.
    APPEND itab_desc.
    <b>* Get the components for that internal table.</b>
    CALL FUNCTION 'GET_COMPONENT_LIST'
         EXPORTING
              program    = v_repid
              fieldname  = 'ITAB'
         TABLES
              components = t_comp.
    <b>* Get the columns that has some value.</b>
    LOOP AT t_comp.
      LOOP AT itab.
        ASSIGN COMPONENT t_comp-compname OF STRUCTURE itab TO <fs>.
        IF NOT <fs> IS INITIAL.
          EXIT.
        ENDIF.
      ENDLOOP.
    Allowed columns.
      IF NOT <fs> IS INITIAL.
        t_allowed_fields = t_comp-compname.
        APPEND t_allowed_fields.
      ENDIF.
    ENDLOOP.
    <b>* Print the Header.</b>
    LOOP AT t_allowed_fields.
      READ TABLE t_comp WITH KEY compname = t_allowed_fields.
      READ TABLE itab_desc WITH KEY compname = t_allowed_fields.
      WRITE: AT (t_comp-olen) itab_desc-text COLOR COL_HEADING.
    ENDLOOP.
    <b>* Print the data.</b>
    LOOP AT itab.
      WRITE: / space.
      LOOP AT t_allowed_fields.
        READ TABLE t_comp WITH KEY compname = t_allowed_fields.
        ASSIGN COMPONENT t_comp-compname OF STRUCTURE itab TO <fs>.
        WRITE: AT (t_comp-olen) <fs>.
      ENDLOOP.
    ENDLOOP.
    Thanks,
    Naren

  • ALV Report to KSB1 Report-- KSB1 Report outputs in Non-ALV Format

    Hi Gurus,
    I am calling KSB1 from report ALV output.
    After execution of KSB1, Report outputs in Classical report format.
    While I execute KSB1 manually it shows in ALV Report.
    From my report how to retain output of KSB1 in ALV Format.
    Thanks in advance.

    Add some lines to BDC to force ALV display, like
    perform bdc_dynpro      using 'RKAEP000' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KOSTL-LOW'.
    * Call the option
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UCSS'.
    * Force grid
    perform bdc_dynpro      using 'SAPLKAE2' '0200'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KAEP_SETT-MAXSEL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'KAEP_SETT-USEGRD'
                                  record-USEGRD_004.
    perform bdc_field       using 'KAEP_SETT-MAXSEL'
                                  record-MAXSEL_005.
    * back to initial screen
    perform bdc_dynpro      using 'RKAEP000' '0100'.
    Regards,
    Raymond

  • Column Dynamic Table ( non ALV) visible - non visible

    Hello
    Using the dynmic table creation and I want to set some columns to invisible per default per
              ls_column->set_visible( 01 ).
    But I want that the user can make this column visible, if necessary.
    In ALV a user can use the standard personalization function to set the invisible columns to visible.
    How can I do this with a normal table ?
         lo_table TYPE REF TO cl_wd_table,
    Thanks and regards,
    Carola

    Hi,
    You should bind your visibility property to your context, then you will be able to provide a personalization view to your user.
    Regards,
    Joseph BERTHE

  • Error message in a table (not ALV)

    Hi there,
    i know that in ALV an error-message appears and the cell is marked if an user puts a not allowed value in the cell.
    Now i want to achieve the same in my non-alv-table. If a user enters a value in a specific cell, i want to output a message and mark the specific cell as "wrong". Can anyone provide me with a code-example?
    Best regards
    David

    HI,
    Even in table cell if a value is entered that is not permitted ,system issues an error message and highlights the cell after some action is performed.
    Case1:  Suppose you enter a character value in date field and perform some action system performs the checks, issues an error message an higlights the cell.
    Case 2: If validation of the entered value needs to be done programatically after an action is performed the use the below logici in the WDOBEFOREACTION method.
    a) Get the node binded to the table( lo_node = wd_context->get_child_node('Node Name").
    b) Using the node reference get alll the elements using the method GET_ELEMENTS of IF_WD_CONTEXT_NODE i.e lo_node.
    c) Now loop at list of elements and for each element use the method GET_STATIC_ATTRIBUTES to get the attribute values
    d) Do the required validation if some error is found use REPORT_ATTRIBUTE_ERROR_MESSAGE using the attribute name and element refernece.
    Hope this helps.
    Regards,
    Madhu.

  • Page number in ALV report

    Hi all,
    I use top of page to print page number for ALV report. When i run my report in backgrond and see the spool, the page is always started from page 2.
    These does not happen when I use non-ALV report, report prints the header starting from page 1 normally. It is weird.
    does anyone of you ever face such of that problem ?
    thanks alots
    Alia

    Hi Alia,
    Page number is usually not set in an ALV display, as compared to  List processing.
    r u sure this is a requirement?
    chk this:
    ALV Print page numbers
    Regards,
    Anjali

  • Mulitiple Line Header creation in ALV

    Hi ALV Folks,
       I am trying to display mulitple lines in the ALV column headings like below .Can any one help how can i do this using ALV .
    i need to show like
    Header-A  -
    Header-B------
    hedA1
    HedA2
    HedA3
    HedB1
    HedB2
    HedB3
    dataA1
    dataA2
    dataA3
    dataB1
    dataB2
    dataB3
    dataA1
    dataA2
    dataA3
    dataB1
    dataB2
    dataB3
    dataA1
    dataA2
    dataA3
    dataB1
    dataB2
    dataB3
    dataA1
    dataA2
    dataA3
    dataB1
    dataB2
    dataB3
    dataA1
    dataA2
    dataA3
    dataB1
    dataB2
    dataB3
    dataA1
    dataA2
    dataA3
    dataB1
    dataB2
    dataB3
    Early response will be appriciated .
    Thanks in advance .
    Thanks & Regards,
      Ramesh babu .P

    Hi Ramesh,
    Sad to say that its not possible. you will have to code using the non-ALV approach e.g. WRITE command.
    Cheers,
    Kelvin

  • Standard buttons in ALV

    Hi all,
    I need to change the text to the standard button "Export" in ALV for the text "Excel" and assing only one function to this button, the function I need is export to excel.
    Does anyone knows how to solve this problem please?
    Help is really appreciated.
    Regards!

    In your first post you asked about ALV and now about non-ALV...
    So about ALV you have the Excel download by default and you are able to change the text.
    About non-ALV download I think you have to use the method: cl_wd_runtime_services=>attach_file_to_response.
    Look at the last post in:
    File download WD4A
    Sergio

  • Company Logo at top of each page in report

    We want to put our company logo on the top of each page in a multi-page printed report (which is already in production and is very complicated).  I don't think you can do this with a standard list abap.  I'm guessing I need to change the abap to a dialogue program and output to a screen?  Can anyone describe the process necessary?  For example will I need to have two containers on the screen, one for the report where I do a leave to list processing, and the other for the logo?  But how would this print - could I do it so the logo appears at the top of each page?
    Certainly SAP provides some (non-alv, non-sapscript) solution to putting a logo at the top of each page?
    Thanks,
    Mike

    Hi,
    I am guessing , that if you are saying non-sapscript, even SMARTFORMS is out of question. Well you don't give many choices, (non-alv, non-sapscript), now do you ?
    As far as I know, I don't think, it is possible to put images using dialog programming or list processing.
    Check out Report Painter if it supports images.
    Regards,
    Subramanian V.

  • Not possible to open PDF file generated by Report functionality

    Hello,
    we are facing the problem that reports in PDF format deliverd in SharePoint by Duet Enterprise cannot be opened by Adobe Reader. The error we get is the following:
    Adobe Reader could not open "filename.pdf" because it is either not a supported file or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
    When trying to open it with Internet Explorer the following error message pops up:
    File does not begin with '%PDF-'.
    Does anyone know how to fix this problem?
    Thanks in advance.
    Kind regards
    Sven

    Hi Hi Sven,
    Could you please tell me the type of report you were trying execute? Is it ERP or BW? And ALV or non-ALV?
    We are supporting PDF report output type only for BW reports and for ERP non-AVL reports. For other types PDF format is not supported.
    If you configure PDF for other report types then you will get report output in PDF file in SharePoint server, but you will face above error message while opening the file.
    Regards,
    Binson

  • S_ALR_87012083: incorrect (sub)totals in exported excel

    Hi,
    We run S_ALR_87012083 to do vendor line item analysis.
    Standard the report subtotals on Vendor, G/L account, Company Code and Currency (in this sequence).
    Sort order Ascending: Company Code, G/L account, Vendor, Special G/L indicator, Assignment, Posting Date, Currency and Business Area.
    Data is displayed in non ALV layout.
    If we use the "Export to Excel" button the result in MHTML format is showing incorrect subtotals and totals.
    These are multiplied with a factor 10.000.000.
    We use 2 digitals behind the comma in SAP and 2 digitals are displayed in excel.
    The single line item values do show correct.
    Even if we are only using 1 item for subtotal or non at all, this issue still comes up.
    I have also removed one to all items from the sort order list, still the same problem.
    Also tried other vendor and customer line item reports starting with S_ALR, but they all have this issue.
    Checked the solution in OSS 423335, but didn't work out (or maybe I am misunderstanding the term sort level).
    So anyone who could help, it would be much appreciated.
    Best regards,
    Geert

    Hi,
    We have the same problem, here is the answer we received from SAP:
    Dear customer,
    Firstly the component BC-CST is not proper, I would like to change
    to BC-FES-OFFI for checking, also it's more like BC-SRV-ALV.
    There is same issue reported from other customers and was solved by
    note 1356898 which provided by our develoer .
    #1356898 WD ABAP ALV export with aggregations is incorrect
    But for tchnical reasons this note needs at lease SAPKB70020 as
    prerequisite.
    If you can't apply this note right now, then you can use below
    workaround to avoid the issue :
    Before you export your list to Excel:
    1. push the "Change layout" button (Ctrl+F8)
    2. choose the tab "Sort order" an check for which column the subtotals
    are created
    3. switch back to the tab "Displayed Columns" and search for this column in the right list and add it to the left one.
    4. Confirm the changes
    If you now export the data, the texts should be there.
    Hope the information helpful.
    Janno

  • Back Order per Vendor

    Hi All,
    I want create Value of Back Order per Vendor report, Any body help me,
    What are the tables I have to use.
    My selection options are :
    Vendor and Delivery Date.
    Thanks,

    Hi,
    If you are on release 4.7 or newer then you don't need to use the tables.
    You can use ME2N with a scope of list that has the ALV flag set on (if there isn't one then create one). With the ALV format this (and simialr) transactions can be used to obtain a lot of different reports.
    For example if you run ME2N with a selection parameter of WE101 (open deliveries exist) and a delivery date range in the past, you will get a list of POs that are overdue for delivery. You can click on the delivery schedule icon to see the individual delivery dates.
    the ALV format means that you can get these lists in the layout you need and they can even be transferred to excel very easily (try doing that with the non-ALV layout !!)
    Steve B

  • Reading checkbox entries in classical report

    Hi, I have a non-alv report.  The report writes out the contents of an itab.  The last field in the itab is checkbox field.  The user can check the fields as expected.    However how can I determine which ones were selected?
    I have tried using at line-selection and at user-command.  However as the fields are part of a header line I don't see how it is possible.
    write:/001 wa_deleted_materials-matnr,
               020 wa_deleted_materials-maktx,
               062 wa_deleted_materials-mtart,
               070 wa_deleted_materials-matkl,
               080 wa_deleted_materials-werks,
               090 wa_deleted_materials-inv_flag,
               095 wa_deleted_materials-mass_change as checkbox.
    I don't want to go to secondary list.  I just want to check the desired fields and then when I trigger an event I want the selected fields moved to a separate itab.  Any ideas?
    Thanks in advance,
    Kevin

    Yes, it's possible - you have to read the list back in to determine which checkboxes are selected. Do F1 on READ (a list).
    Essentially:
      READ LINE 1 FIELD VALUE wa_deleted_materials-mass_change INTO f1.
    Rob
    Message was edited by:
            Rob Burbank

Maybe you are looking for

  • Can I get rid of the color presets?

    I like to have a few presets that I can just apply to a clip and tweek as needed, but I don't want them down at the bottom of the list. Alien Lab? Are you kidding me? Can I get rid of these or is there another place to save favorites? I'd like to be

  • Strange Mobile device tried to connect to my iMac via Bluetooth! Should I be concerned?

    I woke up this morning with a pop-up message saying that a mobile device tried to pair with my system but was rejected most likely from an incorrect password. I've always had "bluetooth" enabled. Never used it though, I have a wired mouse and keyboar

  • RAW-TIFF and Photobooks

    I am using a 10.5.8, on an 2.4 Intel Core 2 Duo and iPhoto 08, (version 7.1.5) and I have a mix of RAW and jpgs in a Photobook I created, but haven't yet ordered. I have in my preferences under Advanced --->RAW Save Edits as 16 bit TIFFs. All of the

  • How to donwload info related to swift mt100  to unix server?

    Hi. I need a little help. We are using the program RFFOM100 in order to download info of swift mt100, but we just can download to pc, but can not download to unix server, how could we perform this action? Thanks in advance. Albio.-

  • FM 8.0p277 crashes when pasting DITA xref?

    For FM8p277, DITA. FrameMaker hard-crashes (a.k.a. "bombs out") if I try to copy-and-paste a DITA xref tag and its contents into another location in the XML topic file. Has anyone else seen this? I have a couple of crash logs I can file as a bug, but