Selection screen: PNP database or other selection criteria

I received a specification of a new to be developed program where they defined a selection screen with a with 2 radio buttons:
1.     Use the logical database PHP for data selection (rb1);
2.     Use other criteria for data selection (rb2).
My question is, is this possible?
Or should I add the other criteria between the GET PERNR and the following code with?
Sample:
GET PERNR
  IF rb2 = ‘X’.
    [Check other criteria]
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
  ENDIF.
null

When either pnp OR other selection :
Create program 1 with 2 radiobuttons ==> pnp-selection (rb1)or other selection (rb2). When rb1 is selected go to pgm1 with pnp ; when rb2 is selected go to pgm2 with other selection criteria. Copy pgm1 to pgm2 and add extra selections en delete pnp-statements.
When pnp WITH extra selections : 1 pgm can be used as you described.

Similar Messages

  • Add new field infotype "z" in logical database selection screen pnp

    Can add new field infotype "z" in logical database selection screen pnp
    I could explain how to realize
    Thanks

    In case to somebody it interests to him: TO EXTEND SCREEN OF SELECTION WITH OPTIONAL DELIMITERS The case that can be given in a screen of selection of a logical data base it does not appear a certain field that we need in the filter, the steps that will be due to follow are the following:
    u2022 To create a view of selection in agreement with the fields that we want to show To review the following Link http://help.sap.com/saphelp_46c/helpdata/es/6e/6ed638e70ef679e10000000a114084/content.htm u2022 To assign the view of selection to a class of report
    u2022 In the code of report to create select option in the selection screen that allows to introduce imput to leak and after start-of-selection to put the following code,
    "Allocation operative area to optional delimiter
      IF NOT p_aroper IS INITIAL.
        DATA: lt_texpr TYPE rsds_expr OCCURS 0 WITH HEADER LINE,
              wa_texpr TYPE rsds_expr,
              lt_rsds_expr_tab LIKE rsdsexpr OCCURS 10 WITH HEADER LINE,
              wa_rsds_expr_tab LIKE rsdsexpr.
        REFRESH lt_rsds_expr_tab.
        wa_rsds_expr_tab-arity = '0'.
        wa_rsds_expr_tab-fieldname = 'OBJID'.
        wa_rsds_expr_tab-option = 'EQ'.
        wa_rsds_expr_tab-low = p_aroper.
        wa_rsds_expr_tab-high = '00000000'.
        MOVE-CORRESPONDING wa_rsds_expr_tab TO lt_rsds_expr_tab.
        APPEND lt_rsds_expr_tab.
        REFRESH lt_texpr.
        wa_texpr-tablename = 'PA9004'.
        wa_texpr-expr_tab[] = lt_rsds_expr_tab[].
        MOVE-CORRESPONDING wa_texpr TO lt_texpr.
        APPEND lt_texpr.
      pnpdynse[] = lt_texpr[].
      ENDIF.
    English is the forum language.
    Edited by: Rob Burbank on May 18, 2011 11:41 AM

  • How do you retrieve PNP variant selection criteria?

    I have a variant which I know are stored in the VARI table and I can retrieve almost all the contents of it using the function RS_VARIANT_CONTENTS.
    But on the selection screen for my PNP report, there is a button labeled "Search Help" where you can enter more selection criterias, but as far as I can tell, these are not retrieved when using the aforementioned function.
    I've tried looking for a function to retrieve these but I can't seem to find one, and I also haven't found a way to just read the CLUSTR and CLUSTD fields of the VARI table directly.
    Does anyone know how to retrieve those selection criterias?

    this is the right function
    check if you don't have part of fields in several return tables
    fields should be present if there is some value stored in variant for those fields

  • Skiping initial selection criteria screen of HR report for Manager Desktop

    Dear All,
    The reports are configured using a custom scenario (Z Scenario) for Manager Desktop and used over the Portal through MSS. I have a requirement where for only one report (named Expired Qualifications) the initial selection criteria screen which comes when accessed through portal needs to be disabled or skipped and directly the transaction S_AHR_61015536 for this report needs to be called.
    Please provide the inputs if it can be done and how for one report only.
    Regards,
    Samir

    Dear Sen,
    I have checked the thread suggested by you but the report here is not independent transaction integrated using iView. It is a part of Scenario which makes the reports available to the managers. It uses MSS Standard iView "Reports" and "Selection Criteria". Both iViews are in one page as delivered by SAP. The reports iView displays all the reports configured in the scenario for Manager Desktop and Selection Criteria iView is launched first in the portal content area when the report ( "Expired Qualifications") link is clicked from the Reports iView.
    Regards,
    Samir

  • Including User selection criteria along with LDB standard selection screen

    Hi
    While creating a HR report, along with the standard selection screen, if the cusomer requires some more fields to be added, How to retrive the data from the DB?
    Is it the way to retrive the data based on Standard selection criteria from the LDB and then filter it based on user criteria or any other way?
    Please help me out in this regard.
    Thank you.

    Yes thats the way. You get the data based on Selection screen of LDB (You can select Report Catogory you wish to) once you get data, You can put CHECK statement to see the data against PXXXX type to the filter value from you custom field on selection screen.

  • Can we use Selection Criteria Screen to tell Query which SQL script to run?

    Dear All,
    When I run this code, it gives me the screen below:
    declare @ScanOp4 nvarchar (30)
    set @ScanOp4=
    /*select T3.U_ScanOp4 from [dbo].[@SCANNING] T3 where T3.U_ScanOp4*/ '[%0]'
    I have used Tools -> Customization to define a UDT and UDF
    Query - Selection Criteria
    Invoice / Credit Note?            [----------------- ]
                                     (there's a drop-down arrow with 2 choices:
                                      Inv = Invoice
                                      CN  = Credit Note
    [OK]       [Cancel]
    Now, I have 2 very similar queries; the only difference is that they use different tables because one is for
    Purchases (OPCH/PCH1), and the other is for Credit Memos (ORPC/RPC1)
    I want to put the above declaration together with my 2 queries all in a single query so that:
    (a) If I select 'Invoice', the Invoice part is executed and only invoices are displayed,
    (b) If I select 'Credit Note', the Credit Note part is executed and only Credit Notes are displayed.
    Do you think such a Query is possible? If yes, please give me an idea how I can achieve it.
    I don't want to use UNION ALL because one of my fields is a LINK field to which I have linked all PDF Scanned documents.
    I want to preserve the links, since this is the reason I'm writing the query.
    Thanks
    Leon Lai
    Here are my skeleton codes
    1st Query: User selects 'Invoice' -
    SELECT
    T0.[TaxDate] AS 'Doc Dt',
    T5.[TransType] AS 'Txn Type',
    T0.[DocNum] AS 'Doc No.',
    T0.[DocTotal] AS 'Amount'
    FROM [dbo].[OPCH] T0
    INNER JOIN [dbo].[PCH1] T1 ON T0.[DocEntry] = T1.[DocEntry]
    INNER JOIN [dbo].[OJDT] T5 ON T0.[TransID]  = T5.[TransID]
    2nd Query: User selects 'Credit Note' -
    SELECT
    T0.[TaxDate] AS 'Doc Dt',
    T5.[TransType] AS 'Txn Type',
    T0.[DocNum] AS 'Doc No.',
    T0.[DocTotal] AS 'Amount'
    FROM [dbo].[ORPC] T0
    INNER JOIN [dbo].[RPC1] T1 ON T0.[DocEntry] = T1.[DocEntry]
    INNER JOIN [dbo].[OJDT] T5 ON T0.[TransID]  = T5.[TransID]

    Try this:
    declare @ScanOp4 nvarchar (30)
    set @ScanOp4=
    /*select T3.U_ScanOp4 from [dbo].[@SCANNING] T3 where T3.U_ScanOp4*/ '[%0]'
    If @ScanOp4='Inv'
    SELECT
    T0.[TaxDate] AS 'Doc Dt',
    T5.[TransType] AS 'Txn Type',
    T0.[DocNum] AS 'Doc No.',
    T0.[DocTotal] AS 'Amount'
    FROM [dbo].[OPCH] T0
    INNER JOIN [dbo].[PCH1] T1 ON T0.[DocEntry] = T1.[DocEntry]
    INNER JOIN [dbo].[OJDT] T5 ON T0.[TransID]  = T5.[TransID]
    If @ScanOp4='CN'
    SELECT
    T0.[TaxDate] AS 'Doc Dt',
    T5.[TransType] AS 'Txn Type',
    T0.[DocNum] AS 'Doc No.',
    T0.[DocTotal] AS 'Amount'
    FROM [dbo].[ORPC] T0
    INNER JOIN [dbo].[RPC1] T1 ON T0.[DocEntry] = T1.[DocEntry]
    INNER JOIN [dbo].[OJDT] T5 ON T0.[TransID]  = T5.[TransID]

  • How to disable save button on selection screen (1000) run from other report

    Hi Experts,
    Can any one let me know how to disable save button on selection screen (1000) run from other report.
    Say I am running from report R1 which submits report R2, but the save button should be disabled on
    report R2(selection screen 100).
    Thanks in advance.
    Regards
    RP.

    Hi RPReddy16 ,
    Try this:
    DATA :BEGIN OF t_extab occurs 0,
                     fcode like rsmpe-func,
                 END OF t_extab.
    REFRESH T_EXTAB.
    MOVE 'SAVE' TO T_EXTAB-FCODE.
    APPEND T_EXTAB.
    CLEAR T_EXTAB.
    SET PF-STATUS 'STATUS' EXCLUDING T_EXTAB.
    Regards,
    José

  • Selection Criteria addition-Not working

    Hi!
    I have this report wherein I need to add two fields VBAP-Kunnr and knvv-konda in the selection screen so that I can do my drill down or search criteria based upon these two selections also apart from the existing ones, but unfortunately I am unable to get throiugh this and somehow putting this two selections in the selection criteria its not taking any effect or its just actinga  dummy selection and I am unale to drill down my report based upon those. Can anyone have a look and let me know what could be the problem please. Help would be highly appreciated.
    Thanks
    *& Include ZSD_PFGENERATETOP Report ZSD_PFGENERATE
    REPORT zsd_pfgenerate LINE-SIZE 170 LINE-COUNT 65.
    TABLES: lips, likp, vbap, vbak, vbrp, vbpa, vbrk.
    CONSTANTS: cns_vgtyp TYPE vbrp-vgtyp VALUE 'J',
    cns_intyp TYPE vbrk-vbtyp VALUE 'M',
    cns_vkorg TYPE vbak-vkorg VALUE 'CA01',
    cns_vkorg_US type vbak-vkorg value 'US01', "DEVK903521
    cns_parsh TYPE vbpa-parvw VALUE 'WE',
    cns_parsp TYPE vbpa-parvw VALUE 'AG',
    cns_parre type vbpa-parvw value 'RE', "bill-to
    cns_auzwp TYPE vbak-auart VALUE 'ZWP',
    cns_auzct TYPE vbak-auart VALUE 'ZCT',
    cns_auzif TYPE vbak-auart VALUE 'ZIF',
    cns_auztm TYPE vbak-auart VALUE 'ZTM',
    cns_fkff TYPE vbrk-fkart VALUE 'ZFF5',
    cns_fkos TYPE vbrk-fkart VALUE 'ZOF5',
    cns_upd(1) TYPE c VALUE 'S',
    cns_mode(1) TYPE c VALUE 'N'.
    Internal Tables and Work Areas
    DATA: BEGIN OF it_vbpos OCCURS 0,
    werks TYPE vbap-werks,
    audat TYPE vbak-audat,
    auart TYPE vbak-auart,
    kunag TYPE vbak-kunnr,
    name1_ag TYPE kna1-name1,
    kunsh TYPE likp-kunnr,
    name1_sh TYPE kna1-name1,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    vbdel TYPE likp-vbeln,
    psdel TYPE lips-posnr,
    kunre type kunre, "Bill-to Party
    name1_re type kna1-name1, "Bill-to Party Name
    END OF it_vbpos,
    BEGIN OF it_vbpos_temp OCCURS 0,
    vgbel TYPE lips-vgbel,
    vgpos TYPE lips-vgpos,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    END OF it_vbpos_temp,
    BEGIN OF it_report OCCURS 0,
    werks TYPE vbap-werks,
    vbeln TYPE vbak-vbeln,
    vbdel TYPE likp-vbeln,
    audat TYPE vbak-audat,
    auart TYPE vbak-auart,
    name1_ag TYPE kna1-name1,
    name1_sh TYPE kna1-name1,
    name1_re type kna1-name1, "Bill-to Party Name
    mark(1) TYPE c,
    END OF it_report,
    BEGIN OF it_vbeln OCCURS 0,
    vbeln TYPE vbak-vbeln,
    END OF it_vbeln,
    wa_vbeln LIKE LINE OF it_vbeln,
    wa_vbpos LIKE LINE OF it_vbpos,
    wa_report LIKE LINE OF it_report,
    wa_sel LIKE LINE OF it_report.
    DATA: it_vbrp type table of vbrp,
    it_vbrk type table of vbrk.
    BDC Variables
    DATA: BEGIN OF bdc_tab OCCURS 0.
    INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    DATA: wa_bdc LIKE LINE OF bdc_tab,
    it_bdcmess TYPE TABLE OF bdcmsgcoll.
    *& Selection-Screen definition
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
    PARAMETERS: p_rdff TYPE c RADIOBUTTON GROUP rad1 DEFAULT 'X',
    p_rdos TYPE c RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN END OF BLOCK block2.
    SELECTION-SCREEN BEGIN OF BLOCK block0 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: s_werks FOR vbap-werks OBLIGATORY NO INTERVALS,
    s_auart FOR vbak-auart,
    s_kunag FOR vbak-kunnr, "Sold-to Party
    s_kunnr FOR likp-kunnr, "Ship-to Party
    s_kunre for vbak-kunnr, "Bill to Party
    s_vdatu FOR vbak-vdatu OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block0.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    PARAMETERS: p_vgbel TYPE vbak-vgbel.
    SELECTION-SCREEN END OF BLOCK block1.
    selection-screen begin of block block3 with frame title text-003.
    parameters: p_billed RADIOBUTTON GROUP r1,
    p_delvd RADIOBUTTON GROUP r1 default 'X',
    p_all RADIOBUTTON GROUP r1.
    selection-screen end of block block3.
    *& Include ZSD_PFGENERATEE01
    START-OF-SELECTION.
    PERFORM read_report.
    END-OF-SELECTION.
    SET PF-STATUS 'STAT1000'.
    IF it_vbpos[] IS INITIAL.
    MESSAGE s999(z001) WITH 'No Data Selected for this criteria'.
    ELSE.
    PERFORM show_report.
    ENDIF.
    *& List Events
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'SELE'.
    LOOP AT it_report INTO wa_report.
    wa_report-mark = 'X'.
    MODIFY it_report FROM wa_report.
    ENDLOOP.
    PERFORM show_report.
    WHEN 'DSEL'.
    LOOP AT it_report INTO wa_report.
    wa_report-mark = ''.
    MODIFY it_report FROM wa_report.
    ENDLOOP.
    PERFORM show_report.
    ENDCASE.
    AT LINE-SELECTION.
    DO.
    READ LINE sy-index FIELD VALUE wa_report-mark wa_report-vbeln
    wa_report-vbdel.
    IF sy-subrc NE 0.
    EXIT.
    ELSE.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = wa_report-vbeln
    IMPORTING
    output = wa_report-vbeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = wa_report-vbdel
    IMPORTING
    output = wa_report-vbdel.
    READ TABLE it_report INTO wa_sel
    WITH KEY vbeln = wa_report-vbeln.
    IF sy-subrc EQ 0.
    wa_sel-mark = wa_report-mark.
    MODIFY it_report FROM wa_sel INDEX sy-tabix.
    ENDIF.
    ENDIF.
    ENDDO.
    REFRESH: it_vbeln.
    LOOP AT it_report INTO wa_report WHERE mark EQ 'X'.
    CASE 'X'.
    WHEN p_rdff.
    wa_vbeln = wa_report-vbdel.
    WHEN p_rdos.
    wa_vbeln = wa_report-vbeln.
    ENDCASE.
    APPEND wa_vbeln TO it_vbeln.
    ENDLOOP.
    SORT it_vbeln BY vbeln.
    DELETE ADJACENT DUPLICATES FROM it_vbeln.
    IF NOT it_vbeln[] IS INITIAL.
    PERFORM process_vf01.
    ENDIF.
    *& Include ZSD_PFGENERATEF01
    *& Form read_report
    Routine to read applicable orders from database
    FORM read_report.
    DATA: lwa_lips TYPE lips,
    lc_vbeln TYPE vbrk-vbeln.
    Retrieve sales orders based on selection criteria where billing doc has not been
    created for the delivery yet
    REFRESH: it_vbeln, it_vbpos, it_report.
    Select into table based on Onsite/Fixed Facility
    CASE 'X'.
    WHEN p_rdff.
    changed for performance reasons (i.e. time-out)
    k~vgbel is not in it_vbpos but was in select statment ?
    SELECT vbap~werks vbak~audat vbak~auart vbak~kunnr AS kunag
    vbak~vbeln vbap~posnr
    INTO CORRESPONDING FIELDS OF TABLE it_vbpos
    FROM vbak INNER JOIN vbap
    ON vbak~mandt = vbap~mandt
    AND vbak~vbeln = vbap~vbeln
    WHERE vbap~werks IN s_werks
    AND vbak~vdatu IN s_vdatu
    AND vbak~vkorg in (cns_vkorg,cns_vkorg_US)
    AND vbap~oid_ship IN s_kunnr
    AND vbak~kunnr IN s_kunag
    AND vbak~auart IN s_auart
    AND ( vbak~auart = 'ZWP' or vbak~auart = 'ZIF' or
    vbak~auart = 'ZCT' or vbak~auart = 'ZTM' or
    vbak~auart = 'ZOIL' ).
    IF SY-SUBRC = 0.
    SELECT vgbel vgpos vbeln posnr FROM lips
    INTO CORRESPONDING FIELDS OF TABLE it_vbpos_temp
    FOR ALL ENTRIES IN it_vbpos
    WHERE vgbel = it_vbpos-vbeln
    AND vgpos = it_vbpos-posnr
    %_hints oracle 'index ("LIPS" "LIPS~Z01")'.
    SORT it_vbpos_temp by vgbel vgpos.
    LOOP AT it_vbpos.
    READ TABLE it_vbpos_temp
    WITH KEY vgbel = it_vbpos-vbeln vgpos = it_vbpos-posnr
    BINARY SEARCH.
    IF SY-SUBRC = 0.
    it_vbpos-vbdel = it_vbpos_temp-vbeln.
    it_vbpos-psdel = it_vbpos_temp-posnr.
    modify it_vbpos.
    ENDIF.
    ENDLOOP.
    ENDIF.
    WHEN p_rdos.
    SELECT k~vbeln p~posnr k~kunnr AS kunag k~audat k~auart p~werks k~vgbel
    INTO CORRESPONDING FIELDS OF TABLE it_vbpos
    FROM vbak AS k INNER JOIN vbap AS p ON k~vbeln = p~vbeln
    WHERE p~werks IN s_werks AND k~vdatu IN s_vdatu AND
    k~vkorg in (cns_vkorg,cns_vkorg_US) AND "DEVK903521
    k~vgbel EQ p_vgbel AND
    k~kunnr IN s_kunag AND k~auart IN s_auart AND
    p~oid_ship IN s_kunnr.
    ENDCASE.
    Determine if delivery has been billed out, if not can create PF Invoice - CHANGED
    LOOP AT it_vbpos INTO wa_vbpos.
    Check Ship-to in
    SELECT SINGLE kunnr INTO wa_vbpos-kunsh FROM vbpa
    WHERE parvw EQ cns_parsh AND vbeln EQ wa_vbpos-vbeln.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    Check for Bill-to
    select single kunnr into wa_vbpos-kunre from vbpa
    where parvw eq cns_parre and vbeln eq wa_vbpos-vbeln
    and kunnr in s_kunre.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    Get Partner Texts
    SELECT SINGLE name1 INTO wa_vbpos-name1_ag FROM kna1
    WHERE kunnr EQ wa_vbpos-kunag.
    SELECT SINGLE name1 INTO wa_vbpos-name1_sh FROM kna1
    WHERE kunnr EQ wa_vbpos-kunsh.
    SELECT SINGLE name1 INTO wa_vbpos-name1_re FROM kna1
    WHERE kunnr EQ wa_vbpos-kunre.
    CASE 'X'.
    WHEN p_rdff.
    IF p_delvd = 'X'.
    optimized for performance reasons i.e. time-out
    Check if delivery has been billed out
    SELECT SINGLE k~vbeln INTO lc_vbeln
    FROM vbrp AS p INNER JOIN vbrk AS k ON p~vbeln = k~vbeln
    WHERE p~vgtyp EQ cns_vgtyp AND p~vgbel EQ wa_vbpos-vbdel AND
    p~vgpos EQ wa_vbpos-psdel AND k~vbtyp EQ cns_intyp AND
    k~fksto NE 'X'.
    refresh: it_vbrp, it_vbrk.
    select vbeln from vbrp
    into corresponding fields of table it_vbrp
    where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
    and vgpos = wa_vbpos-psdel
    %_hints oracle 'index ("VBRP" "VBRP~Z01")'.
    if sy-subrc = 0.
    sort it_vbrp by vbeln.
    delete adjacent duplicates from it_vbrp comparing vbeln.
    select vbeln from vbrk
    into corresponding fields of table it_vbrk
    for all entries in it_vbrp
    where vbeln = it_vbrp-vbeln
    and vbtyp = cns_intyp and fksto 'X'.
    IF sy-subrc EQ 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    endif.
    ELSEIF p_billed = 'X'.
    Check if delivery hasn't been billed out
    SELECT SINGLE k~vbeln INTO lc_vbeln
    FROM vbrp AS p INNER JOIN vbrk AS k ON p~vbeln = k~vbeln
    WHERE p~vgtyp EQ cns_vgtyp AND p~vgbel EQ wa_vbpos-vbdel AND
    p~vgpos EQ wa_vbpos-psdel AND k~vbtyp EQ cns_intyp AND
    k~fksto NE 'X'.
    refresh: it_vbrp, it_vbrk.
    select vbeln from vbrp
    into corresponding fields of table it_vbrp
    where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
    and vgpos = wa_vbpos-psdel
    %_hints oracle 'index ("VBRP" "VBRP~Z01")'.
    if sy-subrc = 0.
    sort it_vbrp by vbeln.
    delete adjacent duplicates from it_vbrp comparing vbeln.
    select vbeln from vbrk
    into corresponding fields of table it_vbrk
    for all entries in it_vbrp
    where vbeln = it_vbrp-vbeln
    and vbtyp = cns_intyp and fksto 'X'.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    endif.
    ENDIF.
    WHEN p_rdos.
    IF p_delvd = 'X'.
    Check if order has been billed out
    SELECT SINGLE * FROM vbrp
    WHERE vbeln EQ wa_vbpos-vbeln AND
    vgpos EQ wa_vbpos-posnr.
    IF sy-subrc EQ 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    ELSEIF p_billed = 'X'.
    Check if delivery hasn't been billed out
    SELECT SINGLE k~vbeln INTO lc_vbeln
    FROM vbrp AS p INNER JOIN vbrk AS k ON pvbeln = kvbeln
    WHERE pvgtyp EQ cns_vgtyp AND pvgbel EQ wa_vbpos-vbdel AND
    pvgpos EQ wa_vbpos-psdel AND kvbtyp EQ cns_intyp AND
    k~fksto NE 'X'.
    refresh: it_vbrp, it_vbrk.
    select vbeln from vbrp
    into corresponding fields of table it_vbrp
    where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
    and vgpos = wa_vbpos-psdel
    %_hints oracle 'index ("VBRP" "VBRP~Z01")'.
    if sy-subrc = 0.
    sort it_vbrp by vbeln.
    delete adjacent duplicates from it_vbrp comparing vbeln.
    select vbeln from vbrk
    into corresponding fields of table it_vbrk
    for all entries in it_vbrp
    where vbeln = it_vbrp-vbeln
    and vbtyp = cns_intyp and fksto 'X'.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    endif.
    ENDIF.
    ENDCASE.
    MOVE-CORRESPONDING wa_vbpos TO wa_report.
    APPEND wa_report TO it_report.
    MODIFY it_vbpos FROM wa_vbpos.
    ENDLOOP.
    if 'onsite field summary', then process by release sales orders
    IF p_rdos = 'X'.
    sort it_report by vbeln.
    delete adjacent duplicates from it_report comparing vbeln.
    else.
    SORT it_report BY werks name1_ag name1_sh vbeln.
    DELETE ADJACENT DUPLICATES FROM it_report.
    endif.
    SORT it_report BY name1_sh werks name1_ag vbeln.
    ENDFORM. " read_report
    *& Form process_vf01
    Call transaction VF01 and fill screen table with order values
    FORM process_vf01.
    DATA: ln_index(2) TYPE n,
    lc_field(20) TYPE c,
    lc_fkart TYPE vbrk-fkart,
    li_lines TYPE i,
    lc_msgtxt(99) TYPE c,
    lwa_bdcoptions TYPE ctu_params,
    lwa_mess LIKE LINE OF it_bdcmess.
    REFRESH: it_bdcmess.
    lwa_bdcoptions-dismode = cns_mode.
    lwa_bdcoptions-updmode = cns_upd.
    CASE 'X'.
    WHEN p_rdff.
    lc_fkart = cns_fkff.
    WHEN p_rdos.
    lc_fkart = cns_fkos.
    ENDCASE.
    REFRESH: bdc_tab.
    PERFORM update_bdc USING: 'X' 'SAPMV60A' '0102',
    ' ' 'BDC_CURSOR' 'RV60A-FKART',
    ' ' 'RV60A-FKART' lc_fkart,
    ' ' 'BDC_OKCODE' '/00'.
    LOOP AT it_vbeln INTO wa_vbeln.
    ln_index = sy-tabix.
    Up to the second delivery of the BDC add the Delivery to the screen, after that click the More Documents for every entry. logic changed for DEVK902353
    CASE ln_index.
    WHEN 1.
    CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln.
    WHEN 2 OR 3.
    IF p_rdos 'X'.
    CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
    'X' 'SAPMV60A' '0102',
    ' ' 'BDC_OKCODE' 'FKAN'..
    ELSE.
    CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln.
    ENDIF.
    WHEN OTHERS.
    If p_rdos 'X'.
    CONCATENATE 'KOMFK-VBELN' '(2)' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
    'X' 'SAPMV60A' '0102',
    ' ' 'BDC_OKCODE' 'FKAN'.
    endif.
    ENDCASE.
    ENDLOOP.
    VF01 will go to a different screen if only one line selected
    DESCRIBE TABLE it_vbeln LINES li_lines.
    IF li_lines EQ 1.
    PERFORM update_bdc USING: 'X' 'SAPMV60A' '0104',
    ' ' 'BDC_OKCODE' '=SICH'.
    ELSE.
    PERFORM update_bdc USING: 'X' 'SAPMV60A' '0102',
    ' ' 'BDC_OKCODE' '=SICH'.
    ENDIF.
    CALL TRANSACTION 'VF01' USING bdc_tab OPTIONS FROM lwa_bdcoptions
    MESSAGES INTO it_bdcmess.
    WRITE: / 'BDC Messages:'.
    SKIP.
    LOOP AT it_bdcmess INTO lwa_mess.
    CALL FUNCTION 'RH_MESSAGE_GET'
    EXPORTING
    arbgb = 'VF'
    msgnr = lwa_mess-msgnr
    msgv1 = lwa_mess-msgv1
    msgv2 = lwa_mess-msgv2
    msgv3 = lwa_mess-msgv3
    msgv4 = lwa_mess-msgv4
    IMPORTING
    msgtext = lc_msgtxt
    EXCEPTIONS
    message_not_found = 1
    OTHERS = 2.
    WRITE: /5 lc_msgtxt.
    ENDLOOP.
    ENDFORM. " process_vf01
    form update_bdc *
    subroutine to add the data to the bdc table for trans. vf01 *
    FORM update_bdc USING dynpro field content.
    CLEAR bdc_tab.
    IF dynpro EQ 'X'.
    bdc_tab-program = field.
    bdc_tab-dynpro = content.
    bdc_tab-dynbegin = 'X'.
    ELSE.
    bdc_tab-fnam = field.
    bdc_tab-fval = content.
    ENDIF.
    APPEND bdc_tab.
    ENDFORM. "UPDATE_BDC
    *& Form show_report
    Report to Display Available Orders on Screen
    FORM show_report .
    DATA: l_idx TYPE i.
    WRITE: / 'Available Orders/Deliveries for Plant:'.
    LOOP AT s_werks.
    WRITE: s_werks-low.
    ENDLOOP.
    SKIP.
    FORMAT INTENSIFIED ON COLOR COL_HEADING.
    WRITE: /5 text-h01, text-h02.
    CASE 'X'.
    WHEN p_rdff.
    WRITE: text-h06.
    ENDCASE.
    WRITE: text-h03, text-h04, text-h05, text-h07,
    / sy-uline.
    FORMAT INTENSIFIED OFF COLOR OFF.
    l_idx = 0.
    LOOP AT it_report INTO wa_report.
    IF l_idx EQ 0.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    l_idx = 1.
    ELSE.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    l_idx = 0.
    ENDIF.
    WRITE: / wa_report-mark AS CHECKBOX,
    wa_report-auart UNDER text-h01,
    wa_report-vbeln UNDER text-h02.
    CASE 'X'.
    WHEN p_rdff.
    WRITE: wa_report-vbdel UNDER text-h06.
    ENDCASE.
    WRITE: wa_report-audat UNDER text-h03,
    wa_report-name1_ag UNDER text-h04,
    wa_report-name1_sh UNDER text-h05,
    wa_report-name1_re under text-h07.
    HIDE: wa_report-mark, wa_report-vbeln, wa_report-vbdel.
    ENDLOOP.
    ENDFORM. " show_report
    Thanks for your kind help.
    Aarav.

    Hi, Anne-Marie;
    You may be running into a common issue that is docuemented here:
    [SelectionFormula|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333833393335%7D.do]
    Regards,
    Jonathan
    Edited by: Jonathan Parminter on Mar 16, 2009 8:03 AM

  • Portal Activity Report with Selection criteria

    Hi All,
    I have created an iview using 'Portal Activity Report' template, added the iview to page and page is added to the role which is created for this report. Also, users were assigned to the new role. When users go to portal and see this report, they are seeing the final output of this report along with the 'Download Report' option.
    My requirement is to give selection screen option (Type of report and Reporting period) to users. So that users will change the selection criteria and run the report as per their need. Please advice me on how to do this.
    Thanks in advance.
    Swapna.

    swapna,
    you can do this by creating a webdynpro application for accessing the database tables, the list of data base tables is in this [help |http://help.sap.com/saphelp_nw04/helpdata/en/48/6aa9429b930b31e10000000a1550b0/frameset.htm]document and use web dynpro application to connect to that tables. Check this thread  for[ dynpro and database tables  |dynpro and database tables;
    regards
    Mahesh

  • MSS Selection Criteria: Organizational Unit selection excludes sub OUs

    When a user selects an OU on the 'selection Criteria' iView, only members of that OU (and not any sub OUs) are included in the report. This is the opposite behavior to MDT, where all members of sub OUs are included.
    Does anyone know of any configuration that can change this? Should I look at configuration of the Object and Data Provider?

    Please check steps as mentioned here
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=199820849
    and report variant, check your evaluation paths if it is being refreshed correctly, click twice to refresh.
    check tje note 1431691
    When the report is launched from
    the portal, the program is reading the table:T77eo for the object
    type-'O' , since there are no entries for the object 'O' in the table,
    the switch INREL is not set, therefore the structure pchobjid is not
    filled while calling the report as shown below. Now I know the
    rootcause, but I don;t know the reason behind the table: T77EO not
    having entries for object "O".
    ==============================================================
        SUBMIT (fcode_rec-progname)
        USING SELECTION-SET fcode_rec-variant
        AND RETURN
                       WITH pchplvar EQ act_plvar
                       WITH pchotype EQ act_otype
                       WITH pchobjid IN pchobjid
                       WITH pchsobid IN pchsobid
                       WITH pchobeg  EQ act_begda
                       WITH pchoend  EQ act_endda
                       WITH pchbegda EQ act_begda
                       WITH pchendda EQ act_endda.
    try to use PNP database for seleciton only these paramters are passed to backend!

  • Report class for a selection criteria

    Hi,
    Can anyone explain how a report class is defined for a selection criteria in ABAP HR .
    Thanks in advance,
    Ry

    This is the process to solve your problem. It seems report categories are also reffered to as report classes, so upon completion you assign the report category and the limitations are then put into action.
    Create customer report class, 000000##:
    IMG u2192 Personnel Management u2192 Human Resources Information
    System u2192 Reporting u2192 Adjusting the Standard Selection Screen u2192
    Create Report Categories.
    Select New Entries and enter the number of your report class and the
    name. Deactivate the For Logical Database PNPCE field.
    Select the Matchcode allowed and Sort allowed indicators and allow
    the entry of a date interval for the data and person selection period.
    Save your entries and create a transport request. Return to the
    Overview screen.
    Select your new report class and select Allowable Selection Criteria in
    the dialog structure, on the Overview screen. Choose New Entries. Use
    the possible entries help, F4, to select the specified selection fields and
    select the field for output on the first page. Save your entries.
    Regards
    Tatenda

  • Selection criteria problem

    Hello folks,
                       I am facing one problem .when I don’t give any selection criteria  my program searches for blank records in respective table for that criteria and blank records are not there so sy-subrc is not coming as 0, But this should not happen in this way , rather program should display all records because that selection criteria is blank. To overcome this issue each time I am checking whether that selection criteria is blank or not. If that  criteria is blank I will simply exclude condition for selection from  database table and criteria is there on selection screen I have to select for accordingly. <b>Is there any other way to get all data from database table for particular column if I don’t give any value for that column on selection screen</b>?

    Hi nirad,
    1. SELECT-OPTIONS  vs parameter
    2. This problem happens in parameter.
    3. In select-options,
       even if we give blank (do not enter anything)
       and bcos we use
       IN abc
       sql,
      the system understand and gives
       ALL records.
    4. So u can use SELECT-OPTIONS (instead of parametes)
       and use IN sql
    5. Other wise
       make your paramters OBLIGATORY.
    6. Or else, as u have already used,
        use IF conditions for sql.
    7. There is no other way !
    regards,
    amit m.
    Message was edited by: Amit Mittal

  • PS report: multible selection for report selection criteria

    Is there a possibility to define multible selections in the report selection variables of a PS hierarchy report?
    I tried to define them via
    CJE6 -> EDIT -> General data selction
    and entered valiables in the FROM column and the TO column. But when I execute the report it will not show multible selction, but only single selection. Also, I did not find a SAP standard report which has multible selection in the report selection criteria screen.
    I found the multible selections only in the DB profile selection screen and the dynamic selection, but that is not the solution I am searching for.
    Can anybody kindly help me with this?

    E.g. S_ALR_87013532
    here you can see multible selection in the DB profile selection group, but not in the report selection group. I would like to use multible selection in the report selection group, as mentioned above.
    I am aware of the possibility of creating a new DB profile, but this is only my option B.

  • Need to take part of selection criteria out of a custom report (R painter)

    Hi Experts..
    I have a requirement to hide cost elements/group which appear as part of selection criteria on our custom report (report painter) for projects.
    1. Why this appears as part of the selection criteria as i did not find this defined in Edit --> General data selection. (I only found  CO area, Valuation, Fiscal year, Period, and Object in there).
    2. We have found a system performance issue when a user put in cost elements for selection. So I am required to take this out. I thought i can just take this out from General data selection.. If I can't find it in there, where would i be able to do that??
    3. Suppose I would hide this selection by creating a screen variant.. I was looking in SHD0
    but its not working with our Z T.Code...it display the error message "Variants are possible only for dialog transactions"... This does not seem to work with a custom t-code. Then how would I do this ????
    Please help clarify on this ....
    Thanks....
    Monica
    Edited by: Monica Kong on Aug 24, 2008 6:01 AM

    Hi Monica,
    I believe we have an executable report here...
    go to se38 -> enter program name -> click on "attributes" button -> display
    We can see the type as 'Executable' or 'Modulepool'
    generally a selection screen is brought by using keywords 'Parameters' or 'select-options' in Executable programs and with screen in modulepool ..although we can use a combination of both in some cases
    So in your program..
    check for keywords
    'Parameters'/'Select-options'
    The best way to proceed is to press F1 on the field that needs to be removed from selection...note the details
    "screen number" and "screen field"
    (1)By default screen number = 1000  if it is an executable program
    Now see the scrren field ..if it is select-options it will something like field-low or field-high
    so in the report
    search for field for cost center and group with keyword starting as parameters or select-options and comment the same
    Remember to comment tte fields throughout the program since this field will be used in multiple locations
    (2) if it is modulepool program note the screen number , go the program and screen and remove the field from screen painter and comment the fields where ever used in the program
    Also note that using screen variant is a good option but done if user needs specific settings on a report or we need the original report as it is plus additional report with few variations
    Hope it helps
    Pls check and revert
    Regards
    Byju

  • Displaying selection criteria in ALV report output

    Hello,
    I’ve been using REUSE_ALV_GRID_DISPLAY function module to display my report content in ALV.
    My report’s selection criteria has parameters, select options, checkboxes and radio buttons.  As part of the ALV output, I want to display the criteria that the user had selected in the selection screen.  I was hoping to do that via parameter "i_callback_top_of_page" and fill the selection criteria in the header area.  I'm using REUSE_ALV_COMMENTARY_WRITE to fill the header area. 
    However, the header area takes too much of view space in the output if I put all the selection screen information in it.
    Is there a way to make the header area scrollable?  What is a good way of displaying the selection criteria information as part of the report output?
    Appreciate your help.
    ss

    Hi SS,
    1. The purpose of displaying / writring
       selection information
       in alv is
       for identifying what the user has seleccted,
       directly from the report (when its printed)
    2. So, the option of priting/writing
       it on the TOP of alv, is ok.
    3. However, U can also choose to WRITE
      it at the BOTTOM (instead of top)
    4. Try to utilise maximum spacing (horizontally)
       field1 : abcd      fidl2 = xyz  field3 = ppp
       field4 : mnc       etc.         etc.
    regards,
    amit m.

Maybe you are looking for

  • Links in IDR

    Is it possible to use links in the IDR?

  • DVD/RW drive not reading DVDs

    I have an HP Pavilion with Vista Home Premium 32 bit, with a LightScribe DVD/RW SuperMulti drive.  I am able to read/burn audio CD's (both commercial and CD-R/RW).  But, I have tried 4 different DVD movie discs, and every time, the drive spins and tr

  • Why is my MB Pro trying to do setup - security issue?

    My MB Pro with OSX Lion was working fine after the most recent software update.   I have it set to require a login at startup but I don't get a login screen.  Instead, I get a setup prompt.  It's as if it's been reset to factory default. I was out of

  • Document splitting causes field overflow for currency type 00 in row 003

    Hi , Friends , Our some of sales bills are stucking iduring  posting to finance after upgrading support packages, earlier there was no any problem. we are trying to post by tcode vf02 , it is throughing an error message Document splitting causes fiel

  • ESS - Reuse of Country Specific Application

    Hi, I am working on EHP5 enviornment. I have a requirement to show the Personal ID service in ESS for country Mexico. But this is not available as standard in ESS for Mexico. So I have tried to reuse the service Personal ID for Thailand. I have done