BPL - Define Selection Criteria (Selection Exit)

We are using TDMS 3.0 with following patch level:
DMIS             2006_1_700     0010
DMIS_CNT     2006_1_700     0010
DMIS_EXT     2007_1_700     0000
We have a scenario where we want to transfer all sales transactions of particular plant in target system. We have selected package BPL scenario in TDMS with business context sales document.
Under 'Define selection criteria' activity, we are getting only sales Document number as a filter criteria. We can extend the filter criteria to any column of table VBAK, but not any of the dependent tables (Like VBAP - containing plant)
The operation guide shows an example of selection criteria for materials, filtering by the start table (MARA-MATNR) and at the same time by a dependent table (MARC-WERKS).  I want to apply the same logic to tables VBAK & VBAP. There are two problems in my way:
1. As per operation guide, when you execute 'Define Selection Criteria', we should see three tab pages. 'Selections', 'Selection criteria' & 'Tables'. But I can see only two in my system i.e 'Selection criteria' & 'Tables'. There is no 'Selection' tab page in my system.
2. Referring to forum Re: BPL: Filtering depending tables , we can use 'Selection Exit'. But can anybody guide me how that can be implemented and attached to the filter / process?
Thanks & Regards,
Audy.

Hi again.
Forum rules do not allow more than one question in the same thread, but anyway...
TDMS BPL works by direct inserts in the database, so functional dependencies are not checked. This means that in VA01 you cannot create a sales order for a customer that does not exist but with BPL you can, though later of course you'll have problems when checking the sales order in VA03 (this is just an example: in practice the sales order context by default also includes the relevant customers). Unlike archiving, where you cannot delete a customer if sales orders for that customer still exist, in TDMS there are no such checks. This means there is really no sequence: in the end everything will be there.
The direct inserts also mean that document numbers are kept the same, so existing objects with the same number are overwritten; check if that is a problem for you.
About the last part of your question: first, don't forget that BPL does not include customizing, so make sure it is already there; second, BPL contexts are designed to include most tables related to a business process, but as you know R/3's data model is quite complex. After the copy you might realize that for your specific process maybe some tables were not considered. In that case I suggest you complain via OSS so that the context can be improved and we all profit.. ;). You must also be careful if you have Z tables that must be added to the context.
Regards,
Rui Dantas

Similar Messages

  • Modifing Exiting report and selection criteria

    hi,
    I am Facing some problems. i am using SBO 2004 2B.
    1) Is is possible to modify exiting reports?
    Can i add a column (user defined or system defined) other than columns which are available in "Form Setting"?
    If so how can I?
    2) Is it possible to add more criteria on reports selection criteria window?

    Mayur,
    If you are asking if you can use the Business One SDK to modify existing Business One reports in SAP Business One 2004 ... the answer is that you cannot. There were no reporting objects exposed in 2004A, B or C.
    There is some functionality with the Business One 2005A SDK for reporting.  You may want to download and look at the documentation on this.
    HTH,
    Eddy

  • Where is define Templates in Profit Center Report - Selection Criteria

    Hello Experts,
    where is define Templates in Profit Center Report - Selection Criteria Window ?
    Dixit Patel

    Define Templates in
    Financials ->Cost Accounting -> Cost Centre Hierarchy

  • Need to define selection criteria

    How can i define  OITL.DocDate<=  as a selection criteria instead of a static value in this query
    SELECT
          OLCT.Location,OWHS.WhsName
          ,OBTN.DistNumber,SUM(OBTN.Balance)Balance
          ,OPCH.DocDate,OPCH.DocNum,OPCH.NumAtCard,OPCH.CardCode+' - '+OPCH.CardName,PCH1.Dscription
    FROM
          OPCH
          INNER JOIN PCH1 ON OPCH.DocEntry=PCH1.DocEntry
          INNER JOIN PDN1 ON PCH1.BaseType=PDN1.ObjType AND PCH1.BaseEntry=PDN1.DocEntry AND PCH1.BaseLine=PDN1.LineNum
          INNER JOIN OITL ON PDN1.ObjType=OITL.DocType AND PDN1.DocEntry=OITL.DocEntry AND PDN1.LineNum=OITL.DocLine
          INNER JOIN ITL1 ON OITL.LogEntry=ITL1.LogEntry AND OITL.ItemCode=ITL1.ItemCode
          INNER JOIN (
                            SELECT
                                  OBTN.AbsEntry,OBTN.DistNumber,SUM(ITL1.Quantity)[Balance],OBTN.U_RefID
                            FROM
                                  OBTN
                                  INNER JOIN ITL1 ON OBTN.AbsEntry=ITL1.MdAbsEntry
                                  INNER JOIN OITL ON ITL1.LogEntry=OITL.LogEntry AND ITL1.ItemCode=OITL.ItemCode
                           where OITL.DocDate<= '20140331'
                            GROUP BY
                                  OBTN.AbsEntry,OBTN.DistNumber,OBTN.U_RefID
                            )OBTN ON ITL1.MdAbsEntry=OBTN.AbsEntry
          INNER JOIN OWHS ON PCH1.WhsCode=OWHS.WhsCode
          INNER JOIN OLCT ON PCH1.LocCode=OLCT.Code
          WHERE OBTN.Balance>0
          GROUP BY OLCT.Location,OWHS.WhsName,OBTN.DistNumber,OPCH.DocDate,OPCH.DocNum,OPCH.NumAtCard,OPCH.CardCode,OPCH.CardName,PDN1.DocEntry,PCH1.Dscription
          ORDER BY PDN1.DocEntry

    Hi,
    Try this query:
    declare @date as datetime
    set @date = ( select max(T0.[DocDate]) from OITL T0 where T0.[DocDate] <= [%0])
    SELECT
          OLCT.Location,OWHS.WhsName
          ,OBTN.DistNumber,SUM(OBTN.Balance)Balance
          ,OPCH.DocDate,OPCH.DocNum,OPCH.NumAtCard,OPCH.CardCode+' - '+OPCH.CardName,PCH1.Dscription
    FROM
          OPCH
          INNER JOIN PCH1 ON OPCH.DocEntry=PCH1.DocEntry
          INNER JOIN PDN1 ON PCH1.BaseType=PDN1.ObjType AND PCH1.BaseEntry=PDN1.DocEntry AND PCH1.BaseLine=PDN1.LineNum
          INNER JOIN OITL ON PDN1.ObjType=OITL.DocType AND PDN1.DocEntry=OITL.DocEntry AND PDN1.LineNum=OITL.DocLine
          INNER JOIN ITL1 ON OITL.LogEntry=ITL1.LogEntry AND OITL.ItemCode=ITL1.ItemCode
          INNER JOIN (
                            SELECT
                                  OBTN.AbsEntry,OBTN.DistNumber,SUM(ITL1.Quantity)[Balance]
                            FROM
                                  OBTN
                                  INNER JOIN ITL1 ON OBTN.AbsEntry=ITL1.MdAbsEntry
                                  INNER JOIN OITL ON ITL1.LogEntry=OITL.LogEntry AND ITL1.ItemCode=OITL.ItemCode
                            where OITL.DocDate<= @date
                            GROUP BY
                                  OBTN.AbsEntry,OBTN.DistNumber
                            )OBTN ON ITL1.MdAbsEntry=OBTN.AbsEntry
          INNER JOIN OWHS ON PCH1.WhsCode=OWHS.WhsCode
          INNER JOIN OLCT ON PCH1.LocCode=OLCT.Code
          WHERE OBTN.Balance>0
          GROUP BY OLCT.Location,OWHS.WhsName,OBTN.DistNumber,OPCH.DocDate,OPCH.DocNum,OPCH.NumAtCard,OPCH.CardCode,OPCH.CardName,PDN1.DocEntry,PCH1.Dscription
          ORDER BY PDN1.DocEntry
    Thanks & Regards,
    Nagarajan

  • 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.

  • Add selection criteria to Billing due date list VF04

    Dear gurus,
    I need to execute report VF04  but looking sales documents by material. is there any enhacement point or user-exit to add this option to program?
    Thank in advance.
    Best regards
    Juan

    Hi,
    Take a copy of the program SDBILLDL.
    Add the field as a parameter ocr select option.
    (1). In ex line 565 add following:
    LOOP AT p_gt_fvkdfi.
    CLEAR vbak.
    LOOP AT s_ernam.
    DELETE s_ernam.
    ENDLOOP.
    ENDIF.
    SELECT SINGLE ernam
    INTO ( VBAK-ERNAM)
    FROM vbak WHERE vbeln = p_gt_fvkdfi-vbeln
    AND ernam IN s_pernam.
    IF sy-subrc NE 0.
    DELETE p_gt_fvkdfi.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    Create your own transaction code to this report instead of VF04.
    (2).
    What you can do is use user exits, USEREXIT_VKDFS_SORTKRI_SALES and USEREXIT_VKDFS_SORTKRI_DEL in V05IEXIT for sales and delivery related billing respectively. All you need to do is to load the user name into VKDFS-SORTKRI and that should be it.
    (3).
    http://saptechsolutions.com/pdf/SDBillingDocumentConsolidationAndSplit.pdf
    (4).please chec for OSS notes.
    (5).SPRO IMG -> Sales and Distribution -> Billing -> Lists -> Define Selection Criteria
    regards
    balajia.

  • Additional selection criteria for RHECM_CREATE_COMP_PROCESS (create compens

    Dear All,
    There is a requirement to add additional selection criteria for  RHECM_CREATE_COMP_PROCESS.
    Compensation Plan needs to take several optiions rather than a single option.
    Incentive Plan Type to be added as additional selection criteria
    Do we need to copy the standard program and then modify it or there can be some other way out for it.
    Thanks and Regards
    Shraddha

    have checked out the SDN forums quite throughly and have come up with a couple of questions/solutions.
    1) Copy the program into Z-name space and add in the code
    Question: Where to specifically add the code, the program is huge with multiple enhancement points being seen in the code.
    Can someone please guide me where I can change the displayed records, point where iI can append data or change the internal table being sent for ALV display.
    <b>---> U have to find out , where /how  they defined Selection screeen , final output they are displaying.</b>
    2) Make changes in SPRO>Define field selection for material document list.
    Question: The required field is not present within the listing, It does give the option to make new entries, but I have to specify a program/table and field.
    If I create my own program to get the details and display onto an ALV Grid, will the program be called when I make selections on that requisitioner field?
    <b>---> lot of work to do</b>
    3) This is text copied from a thread, I have lost the link to it.
    Create a Z report that is a copy of the selection include of the standard selection screen include with the additional selection criteria.
    - Export the extra selection criteria value to shared memory.
    - Submit the standard VL10G program with the selection sets.
    - In user exit (depends on which field needs to be checked), import the extra selection criteria value back in and filter the selected data set.
    Could someone please guide me if it is possible to do the above within RM07DOCS, and a little more detail on how to go about it?.
    <b>Better Options --->try to get the logic of MB51 , then do changes which are required.
    most of data , u will get it from MSEGMKPFMARA+MBEW.</b>
    revert back in case of any other issues.
    Regards
    Prabhu

  • Changing standard selection criteria (MB51)

    Hi all.
    I have a requirement to add the 'Requisitioner' field in the selection criteria for MB51, program (RM07DOCS). I am on version ECC6
    The requisitioner field is in the EKPO ( Purchasing Document Item) table: EKPO-AFNAM.
    What I need to do is, add this field in the selection criteria and select all purchase orders and their relating material documents (MKPF MSEG) according to entry in this field. I know the logic which I have to implement.
    I have checked out the SDN forums quite throughly and have come up with a couple of questions/solutions.
    1) Copy the program into Z-name space and add in the code
    Question: Where to specifically add the code, the program is huge with multiple enhancement points being seen in the code.
    Can someone please guide me where I can  change the displayed records, point where iI can append data or change the  internal table being sent for ALV display.
    2) Make changes in SPRO>Define field selection for material document list.
    Question: The required field is not present within the listing, It does give the option to make new entries, but I have to specify a program/table and field.
    If I create my own program to get the details and display onto an ALV Grid, will the program be called when I make selections on that requisitioner field?
    3) This is text copied from a thread, I have lost the link to it.
    Create a Z report that is a copy of the selection include of the standard selection screen include with the additional selection criteria.
    - Export the extra selection criteria value to shared memory.
    - Submit the standard VL10G program with the selection sets.
    - In user exit (depends on which field needs to be checked), import the extra selection criteria value back in and filter the selected data set.
    Could someone please guide me if it is possible to do the above within RM07DOCS, and  a little more detail on how to go about it?.
    Will reward points asap.
    Thank you

    have checked out the SDN forums quite throughly and have come up with a couple of questions/solutions.
    1) Copy the program into Z-name space and add in the code
    Question: Where to specifically add the code, the program is huge with multiple enhancement points being seen in the code.
    Can someone please guide me where I can change the displayed records, point where iI can append data or change the internal table being sent for ALV display.
    <b>---> U have to find out , where /how  they defined Selection screeen , final output they are displaying.</b>
    2) Make changes in SPRO>Define field selection for material document list.
    Question: The required field is not present within the listing, It does give the option to make new entries, but I have to specify a program/table and field.
    If I create my own program to get the details and display onto an ALV Grid, will the program be called when I make selections on that requisitioner field?
    <b>---> lot of work to do</b>
    3) This is text copied from a thread, I have lost the link to it.
    Create a Z report that is a copy of the selection include of the standard selection screen include with the additional selection criteria.
    - Export the extra selection criteria value to shared memory.
    - Submit the standard VL10G program with the selection sets.
    - In user exit (depends on which field needs to be checked), import the extra selection criteria value back in and filter the selected data set.
    Could someone please guide me if it is possible to do the above within RM07DOCS, and a little more detail on how to go about it?.
    <b>Better Options --->try to get the logic of MB51 , then do changes which are required.
    most of data , u will get it from MSEGMKPFMARA+MBEW.</b>
    revert back in case of any other issues.
    Regards
    Prabhu

  • 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

  • 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

  • Work Order Reporting using I_BEGRP as a selection criteria

    Hello all,
    I am having a small problem regarding the authorization object I_BEGRP, which appears at general data informed tab at equipment level. The situation is as described below:
    Our client has several subcontractors working with Maintenance Work Orders in the system, and in order to control that each subcontractor does only access to their own data (equipment, work orders, etc.) different authorization group has been used to assign each of the equipment.
    Problem is now when the client needs to be able to know the list of MWO per subcontractor.
    The need is clear: for a user that is not restricted by this authorization group, it cannot be usedas a selection criteria to obtain a list of WO of a certain subcontractor.
    I have seen that it can be shown in the equipment standard report IH08, but only as exit data, but not as entry selection criteria, but neither for MWO (IW39) nor for notifications (IW29) it can be used as an entry selection criteria.
    Can someone help me with this issue? is the only solution to make a custom development, and to copy program RIAUFK20 in order to allow this field as an input?
    Thank you very much for your help.
    BR,
    Francesc.

    Hi,
    the only workaround I can think of is to use suitable search help for equipment. So the process would be to run IW29, open search help for equipment that allows you to specify authorization group (I think Equipment by Equipment list should work), then select all equipments from the auth. group and then run IW29 restricted by equipments. It's not nice but it allows you to select all orders that have equipments assigned to some specific authorization group. Otherwise you need to enhance standard reports to allow authorization group as one of the select options.
    Cheers

  • How to call the same query more than once with different selection criteria

    Hi,
    Please do anybody know how to solve this issue? I need to call one query with the fixed structure more than once with different selection criteria. For example. I have following data
    Sales organization XX
                         Income 2008  Income 2009
    Customer A       10                 20
    Customer B        30                  0
    Sales organization YY
                         Income 2008  Income 2009
    Customer A        20                5
    Customer B        50                10
    Now, I need this. At the selection screen of query, user fill variable  charakteristic "Sales organization" with interval  XX - YY, than I need to generate two separate results per sales organization, one for Sales Organization XX and the second for SO YYwhich will be displayed each on separate page, where result for SO YY will be dispayed under result for SO YY. Are there some options how to do it for example in Report Designer or WAD or with programming? In Report Designer is possible to use one query more than once, but I dont know how to force each query in RD to display result only for one Sales Organization, which will be defined in selection screen.
    Thank you very much
    J.

    Hello,
    thanks to all for cooperation. Finally we solved this issue with the following way..
    User fill appropriate SO on the selection screen, which is defined as range. This will resulte, that selected SO are listed in report below each othe (standard behavior). Required solution we achieved with the Report Designer, we set page break under each Result row of RD. This caused, that report is divided into required part per SO, which are stated each on separate page.
    J.

  • Copy selection criteria from quotation to Sales order

    Hi Experts,
    I am creating a quotation. For the quotation line item, i am going to batch determination. Then i am clicking the SELECTION CRITERIA button. It gives me the batch characteristics screen. There i am entering the values to the characteristics. While coming back to sales order screen, i am copying only the SELECTION CRITERIA ( i am not copying the batches ).
    I am creating a sales order w.r.t the quotation. I want the selection criteria of the quotation line item to be copied into sales order line item. How to proceed for this?
    I checked the copy control in VTAA. But i am not able to find any configuration to copy a Quotation line item "SELECTION CRITERIA" to a sales order line item.
    Is this possible via a configuraton or thorugh any user exit?
    Thanks,
    Niranjan.

    Hi,
        Check the exit in programs MV45AFZZ (FORM USEREXIT_MOVE_FIELD_TO_VBKD) as u are using purchase order text.
    Regards

  • The parameter name [...] in the query's selection criteria does not match..

    Hi all,
    I'm trying to pratice EJB 3 (which I learnt at school), with JSF and JPA, but i'm really stuck with that error :
    Exception [TOPLINK-6094] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: The parameter name [departmentID] in the query's selection criteria does not match any parameter name defined in the query.
    Query: ReadAllQuery(oracle.datamodel.Employees)
    I will try to explain clearly what i'm trying to do :
    In fact, i'm following that tutorial :
    http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
    But, as i didn't have any oracle database, but had a mysql one on my machine, i decided to use that DB instead of the the oracle DB... So i created a set of example data (to replace the oracle example set) ...so i created the tables EMPLOYEE, and DEPARTMENT... with the correct relations (FK) and PK)
    All was ok, i choose my "mysql-connector" (jdbc) instead of the oracle jdbc connector... so i could follow the tutorial.
    My problem appears at the step 12 (of "Creating a Master-Detail JavaServer Faces Page"), when i run the file deptEmployees.jspx.
    The information of the first departement displays correctly :
    departmentID 1
    departmentName ... etc
    but it can't display the employees belonging to that department !
    the error is :
    JBO-29000: Exception Description: The parameter name [departmentID] in the query's selection criteria does not match any parameter name defined in the query. Query: ReadAllQuery(oracle.datamodel.Employees)
    I think i understand what is the problem... I think that the query in charge of gathering the data of a specific departement need a parameter, but couldn't find it. But i don't know why :-/ I have tried many things and read the topics talking about that error... but it didn't solved the problem. I don't know anymore where to investigate.
    I have created a Zip file of my work (it's an EJB/JSF Application.. with jdev 10.1.3.3.0)
    (available here : http://dl.free.fr/mQ5esdQuS/EJB_appli.zip)
    I would be glad if someone could take few minutes to help me.
    Thank you in advance,
    Thomas B (student)

    Hello,
    This is a common mistake. Java string comparisons in TopLink are case sensitive by default, and since column names are uppercase when defaulted, TopLink cannot find the "departmentID" column name. In this case, Departments ID column defaults to "DEPARTMENTID" as required by the JPA specification.
    Either change Departments id annotation to     @Id
        @Column(name="departmentID", nullable = false)
        private Integer departmentID;or change Employees' ManytoOne annotation to:
        @ManyToOne
        @JoinColumn(name = "departmentID", referencedColumnName = "DEPARTMENTID")
        private Departments departments;Best Regards,
    Chris

Maybe you are looking for

  • HT5622 can I use one apple ID for both iPhone and iPad?

    hello, i just bought a new ipad and want to use the same apple ID that i used in my iphone. is it possible? thank you for helping me

  • Loops and Arrays help

    Hi, I'm a freshman in college and new to java. I am completely lost and really need help with a current assignment. Here are the instructions given by my teacher... Building on provided code: Loops and Arrays Tracking Sales Files Main.java and Sales.

  • Shared Photo Streams not appearing in iPhoto.

    I have a few Photo Streams that were recently shared with me. I can access them fine on my iPhone. When I am on my MacBook Air however, these Photo Stream folders are no where to be found. I followed this article: http://support.apple.com/kb/ts3989 a

  • Vista 'failed to start' software clash.

    I have a Blackberry 7520 with Nextel and BlackBerry desktop software 4.2 SP2. There appears to be a conflict with the Vista OS. I've worked with Microsoft Tech Service for some time to isolate a "Failed to start" problem requiring recoveries on many

  • Setting the white point and gamma

    I've heard that when calibrating your display you should set the white point and gamma to native. What is the difference between setting the white point at 65k and the gamma at 2.2? Thanks in advance for your time Rick