REG: DTP - Selections

Hi Gurus,
Please guide me in the ABAP Routine for the DTP Selections.
Here is the code:
Tables: ZIP_SEL_TAB.
data: l_idx like sy-tabix.
  select single * from ZIP_SEL_TAB.
  read table l_t_range with key
      fieldname = 'COSTCENTER'.
  l_idx = sy-tabix.
  l_t_range-low = ZIP_SEL_TAB-COST_CENTER.
  if l_idx <> 0.
    modify l_t_range index l_idx.
  else.
    append l_t_range.
  endif.
  p_subrc = 0.
The Cost Center value is not getting into DTP Selections.
Please correct the Code if it is wrong.
Thanks in Advance.
With Regards,
Ravi Kanth

Tables: ZIP_SEL_TAB.
data: l_idx like sy-tabix.
select single * from ZIP_SEL_TAB.
read table l_t_range with key
fieldname = 'COSTCENTER'.
      l_t_range-iobjnm = <your target infoobject tech name>.
      l_t_range-fieldname = <your source field/info object name>
      l_t_range-low = ZIP_SEL_TAB-COST_CENTER.
      l_t_range-option = 'EQ'.
      l_t_range-sign   = 'I'.
      l_idx = sy-tabix.
          if l_idx <> 0.
            modify l_t_range index l_idx.
          else.
            append l_t_range.
          endif.
p_subrc = 0.
**i assume ZIP_SEL_TAB is a Z table created by U.
Hope this helps

Similar Messages

  • Table that contains DTP selections

    Hi,
    Does anyone know a table in BI that contains the specific DTP selections? For infopackages, we already found RSLDPSEL.
    Thank you.

    Hi Donna,
    Check table  RSBKDATAPAKSEL.
    Or you can check table RSSELDTP, in this table all selections are stored in one field with its characteristic, separated by ;
    Regards,
    Durgesh.
    Edited by: Durgesh Gandewar on Nov 8, 2011 12:04 PM

  • Reg:DTP

    Hi,
        i have a doubt that if we do the load from source system to PSA through infopack two times and then if we create DTP and load that into data targets. then will that DTP selects both the requests or the recent one?
      Can any body explain this funda in simple terms how DTP will check which data to load.
    Thanks,
    Srinivas.

    Hi Srinivas,
    If you have chosen "Delta" IN dtp then it would select all those requests which are not yet updated  in the data targets and combine then into a single request and load them to data target.
    However if you have chosen "Full " Then it doesn't care for updated or not updated requests , it simply loads all requests in the data target.
    The below Blog is an excellent description of DTPs.
    Find time to go through it to make your foundation firmer.
    /people/community.user/blog/2007/06/22/sap-netweaver-70-bi-data-transfer-process-dtp-blog-series
    Hope it helps !
    Manish

  • DTP selection criteria in start routine

    Hi,
    I have a code in the start routine where a variable lv_date gets the date from the DTP selections...
    DATA : i_filter TYPE rsbk_th_range,
                wa_filter TYPE rsbk_s_range.
    READ TABLE i_filter INTO wa_filter WITH  KEY
          fieldnm = 'ACT_GI_DTE '.
        IF sy-subrc EQ 0.
          lv_date = wa_filter-low.
       ELSE.
    But now my problem is that we are no more giving the range, instead we are giving the single value. so now my code should read the single value ( lv_date = wa_filter-low) instead of the low value of the range. So how can I achieve this?
    I mean my lv_date should get the single value populated in the DTP selections instead of the low value of the range values.
    How can i achieve this??
    Regards,
    Shreesh.

    Hi,
    When you give range in any variable, it lower value is captured in low whereas upper value is captured in high of the variable.
    Now that you are no more giving range but only single values, it would be enough if your code reads the data from low of the variable.

  • Reg: LDB& Selection screen

    Hello All,
    I have a question reg. selection screen associated with LDB. Iam developing a LDB for Hedge where there are nodes which have the same selection opt but
    they are disjunct. But in LDB static slection screen , we associate Sel Opt with
    a node  and it would appear only for that node. In my case , i have two nodes for the same Sel Opt. How can i resolve this issue ? Kindly help.

    Hai Srivijaya
    Go through the following Document
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB
    good info about Logical Database. you can check the link.
    http://www.geekinterview.com/question_details/1506
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Re: How to Create and Use ldb in reports?
    Re: Logical databases
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Functions for displaying and changing logical databases:
    Call Transaction SE36 or
    Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
    Interaction between database program and report:
    During program processing, subroutines are performed in the database program and events are executed in the report.
    To read data from a database tables we use logical database.
    A logical database provides read-only access to a group of related tables to an ABAP/4 program.
    advantages:-
    The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
    i)An easy-to-use standard user interface.
    ii)check functions which check that user input is complete,correct,and plausible.
    iii)meaningful data selection.
    iv)central authorization checks for database accesses.
    v)good read access performance while retaining the hierarchical data view determined by the application logic.
    disadvantages:-
    i)If you donot specify a logical database in the program attributes,the GET events never occur.
    ii)There is no ENDGET command,so the code block associated with an event ends with the next event
    statement (such as another GET or an END-OF-SELECTION).
    1. transaction code SLDB.
    2.enter name z<ldb-name>
    3.create
    4.short text
    5.create
    6. name of root node (here Ekko)
    7. enter short text (f6)
    8.node type -> data base table.
    9.create
    10 change logical DB
    riht click on ekko and insert node
    here node name ekpo
    11.create
    12. click on selections
    13. press no Should the changed structure of Z<ldb name> be saved first.
    14.select tables which you want to join.
    15.transfer
    16 now you have to o to coding part.
    17. save
    activate.
    19.click to src code
    double click on first include and activate
    Regards
    Sreeni

  • DTP Selection condition

    Hi Experts,
    I wanted to know if we can read selection conditions maintained in DTP in the start routine using any custom code or using any standard function module.
    Any help will be appreciated.
    Thanks,

    Hi,
    You can do that by writing code to select data from this table RSBKDATAPAKSEL
    Hope this helps
    TRUC

  • DTP selection

    I want to delete the request from the DSO which have same selection conditions applied on the DTP.
    Can u plz tell which table other than RSSELDTP table stores the selection values for a particular request for a DSO.

    Well there are 2 tables in BI 7.0 RSBKDATAPAKSEL and
    RSBKSELECT.
    You can see which one helps u in your design.
    I would also recommend checking this blocg
    SAP NetWeaver 7.0 BI: Get runtime information of a Data Transfer Process (DTP) in a Transformation
    Hope this helps you to proceed further.

  • Reg: SQL select Query in BPEL process flow

    <p>
    Hi,
    I am suppose to execute a SQL select query (in BPEL Process flow) as mention below in JDeveloper using Database adapter.
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;xyz&gt;
    </p>
    <p>
    AND OBJECT= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    <strong>Now my question is:
    1.</strong> What does this "*" refer to in the query and how can I retrieve the value of LENGTH*WIDTH* HEIGHT from the query where LENGTH,WIDTH and HEIGHT are the individual field in the table.
    2.What does this " AS" refer to? If " ITEM_CUBE " is the alies for the table name "ITEM" to retrieve the value, then query shoud be evaluated as
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE <strong>ITEM_CUBE.ITEM</strong>= &lt;xyz&gt;
    </p>
    <p>
    AND <strong>ITEM_CUBE.OBJECT</strong>= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    Is my assumption correct?
    Please suggest asap.
    Thanks...
    </p>
    <p>
    </p>

    Hi
    Thank for your reply!
    I have a nested select query which performs on two different table as shown below:
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;abc&gt;
    </p>
    <p>
    AND OBJECT= (SELECT NAME FROM SUPPLIER WHERE ITEM=&lt;Item&gt; AND SUPP_IND = &lsquo;Y')
    I am using DB adapter of Oracle JDeveloper in BPEL process flow, where I can able to select only one master table in DB adapter say SUPPLIER and its attributes at a time.But as per my requirment I need to select both the table (CUBE and SUPPLIER) in a single adapter to execute my query.
    It can be achievable by using two DB adapter , One to execute the nested query and another to execute the main qyery considering value of nested query as a parameter.But I want to achieve it by using a single one.
    Am I correct with my concept?
    Please suggest how to get it ?
    </p>
    Edited by: user10259700 on Oct 23, 2008 12:17 AM

  • Reg the selection screen value request

    i am writing this code for getting corresponding material no for the plant which i giving in the selection-screen .
    parameter : WERKS type marc-werks,
                matnr type marc-matnr.
    data : begin of itab occurs 0,
           matnr like marc-matnr,
           werks like marc-werks,
           end of itab.
    at selection-screen on value-request for werks.
    select matnr werks from marc up to 10 rows into table itab.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        RETFIELD               = 'WERKS'
      PVALKEY                = ' '
       DYNPPROG               = sy-cprog
       DYNPNR                 = sy-dynnr
       DYNPROFIELD            = 'WERKS'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      TABLES
        VALUE_TAB              = itab
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    pls help

    Hi Check this ...
    Its working.....
    PARAMETER : werks TYPE marc-werks,
    matnr TYPE marc-matnr.
    DATA : BEGIN OF itab OCCURS 0,
    matnr LIKE marc-matnr,
    werks LIKE marc-werks,
    END OF itab.
    DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.
    DATA: return TYPE TABLE OF ddshretval WITH HEADER LINE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR werks.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'T001W'
          fieldname         = 'WERKS'
          dynpprog          = sy-cprog
          dynpnr            = sy-dynnr
          dynprofield       = 'WERKS'
        TABLES
          return_tab        = return
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      REFRESH dynfields.
      READ TABLE return WITH KEY fieldname = 'WERKS'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR matnr.
      SELECT matnr werks FROM marc
      INTO TABLE itab
      WHERE werks EQ return-fieldval.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
    DDIC_STRUCTURE = ' '
      retfield = 'MATNR'
    PVALKEY = ' '
      dynpprog = sy-cprog
      dynpnr = sy-dynnr
      dynprofield = 'MATNR'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
      value_org = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
      TABLES
      value_tab = itab
    FIELD_TAB =
    RETURN_TAB =
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3  .
      IF sy-subrc NE 0.
    ENDIF.
    Regards,
    Sai Ramesh

  • Reg. Selection screen in Dashboard Reports

    Hi,
    This is regarding the Variable selection screen appearing for the Dashboard Reports.  Say, when the user clicks on the Dashboard report in Portal, it should directly go to the page showing the Charts & Graphs instead of showing the Variable selection screen.  There are some mandotory values in the selection screen like Fiscal year in our report, so whenever i click the report it is first showing up the variable selection screen and then its showing the report.
    Is it possible to execute the report directly without showing up the variable selection screen?
    Thanks for your time.
    Regards,
    Murali

    Hi Murali,
    The best way is to do with Filter web Item.
    But, since you want to do something in the web page itself. i dont think there is any such option available if your template has only charts.
    If you have Analysis Item or Navigation Pane in your dashboard template, then there is a way out.
    You simply need to right-click on either of them.
    You will see Filter. So, here you can set the variable value.
    This doesnt work, if you right-click on the charts.
    -Pradnya

  • Reg:Skipping Selection screen

    Hi Experts,
                       My requirement is that i have a executable program with selection screen and the output will be of ALV display.
                       For some users i need to take them directly to the  ALV display without displaying selection parameters .
    Regards,
    Vikram sukumar

    Hi,
    try this logic it works.
    declare a selection screen with number
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    parameter p_matnr type matnr.
    SELECTION-SCREEN END OF SCREEN 100.
    if sy-uname ne 'CHACX074'.
    call the selection screen only if the particular user needs screen.
    call screen 100.
    else.
    p_matnr = '100'.
    endif.
    write : p_matnr.
    When you are creating TCODE dont specify the Selection screen . as its determine by the program.
    by this you can use single TCODE.
    Regards,
    Shanmugavel Chandrasekaran
    Edited by: shanmugavel chandrasekaran on Mar 10, 2010 6:37 AM

  • Reg Dynamic Selections in Logical DataBases

    Hi All,
      I am forcefully scheduling a report to run in background mode even though the users run it online.
    While doing so I have handled all the parameters and the select options in the selection screen in the following way.
    SELECT OPTIONS
      wa_rspar-selname = 'BUDAT'.
       wa_rspar-kind = 'S'.
       if BUDAT[] is not initial.
          loop at BUDAT.
             wa_rspar-sign = BUDAT-sign.
             wa_rspar-option = BUDAT-option.
             wa_rspar-low = BUDAT-low.
             wa_rspar-high = BUDAT-high.
             append wa_rspar to rspar.
          endloop.
       else.
         wa_rspar-low = BUDAT.
         append wa_rspar to rspar.
       endif.
       clear: wa_rspar.
    PARAMETERS.
    wa_rspar-selname = 'SORTART'.
       wa_rspar-kind = 'P'.
       wa_rspar-low = SORTART.
       append wa_rspar to rspar.
       clear: wa_rspar.
    While doing so since the report uses logical database-the dynamic selection portion has to be handled otherwise the dynamic selection is ignored and the report is displayed wrong.
    How can we handle the dynamic selection portion for the forceful conversion of the program to background mode even if it is run online.
    Has anyone faced this kind of issue.If so how was it resolved.
    Thanks in advance.

    Finally it seems not to be possible to fill the dynamic selection of a logical database during INITIALIZATION in a report which is using the respective logical database (under report properties).
    My solution was to create a new select option within the customer program which refers to the respective database column (... FOR bsis-gjahr). If this column is supported by the dynamic selections of the logical database, then the values entered on the selection screen are automatically transferred and used by the logical database selection. It is just important to refer to the correct table, as BSIS-gjahr is working while BSEG-gjahr and BKPF-gjahr are not working in my example.
    See the following link:
    http://help.sap.com/saphelp_470/helpdata/en/9f/dba73935c111d1829f0000e829fbfe/content.htm?frameset=/de/9f/dba76035c111d1829f0000e829fbfe/frameset.htm&current_toc=/de/d3/2e974d35c511d1829f0000e829fbfe/plain.htm&node_id=305

  • REG hiding selection-screen comment

    Hi all,
    Cud any one tell me how to hide a selection-screen comment.

    hi chaitanya,
    see the example may be useful.
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(8) PWD.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS: PASSWORD(8) MODIF ID AAA.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: PROGRAM(8).
    SELECTION-SCREEN END OF BLOCK BLOCK.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'AAA'.
          SCREEN-invisible = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    reward if useful,
    thanks and regards

  • Reg: calling selection screen from the second list

    Hi all,
    How can we call the selection screen from the second screen.
    Can any one help me to solve this problem.

    HI RJ,
    Try .....
    case sy-ucomm.
    WHEN '&F03'.
    LEAVE TO SCREEN '0'.
    endcase.
    after the FM for grid-display
    i m using the same .....
    i hav selection-screen..then alv grid screen 1  then again another screen with alv grid display..
    bt in my code for first alv grid ...i m using REUSE_ALV_GRID_DISPLAY_LVC
    as
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
          EXPORTING
            i_callback_program       = sy-repid
            i_callback_pf_status_set = 'SET_PF_STATUS'(303)
            i_callback_user_command  = 'USER_COMMAND'(304)
            i_grid_title             = 'Reconcilation Report'(305)
            is_layout_lvc            = it_layout
            it_fieldcat_lvc          = gt_fieldcat3[]
          TABLES
            t_outtab                 = gt_msg[].
    here i musing set_pf_status to add one pushbutton to the screen. in ur case u can avoid that...
    after that
    *&      Form  set_pf_status
          text
         -->EXTAB      text
    FORM set_pf_status USING extab TYPE slis_t_extab.           "#EC NEEDED
      SET PF-STATUS 'STANDARD_FULLSCREEN'.
    *get back to Selection Screen
      case sy-ucomm.
        WHEN '&F03'(328).
          LEAVE TO SCREEN '0'.
      endcase.
    ENDFORM.                    "set_pf_status
    its working for me..
    Thnx
    Rohit...
    Edited by: Rohit Kumar on Oct 29, 2008 3:20 PM

  • Reg. cursor-selection in module pool....have ur points.

    Hi all,
    Pleas. help me with  a simple example of at cursor-selection in module pool programming.
    with simple code & steps
    <b>Have ur points.</b>
    Regards,
    [email protected]

    Hi Pradeep,
    The Best explanation with example comes from our help.sap.com....
    <i><b>http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm</b></i>
    Also this might help...
    <b>MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]
    [ ON {CHAIN-INPUT|CHAIN-REQUEST} ]
    [ SWITCH switch ].
    ... AT CURSOR-SELECTION</b>
    The AT CURSOR-SELECTION addition at the event PAI causes the module mod to be called only if
    The function used to trigger event PAI has function code "CS" and function type "S"
    The cursor is placed on a single input or output field of the screen at the moment of the user action
    The call occurs within the usual PAI processing, meaning that the automatic input checks defined in the system or in the ABAP Dictionary are executed and the MODULE statement is called according to its position in the event block. You can use the addition in connection with the FIELD statement.
    If the PAI event is triggered under the above circumstances, the function code is not passed to sy-ucomm and the OK field. They keep their previous values.
    <b>Note</b>
    The function type and function code of a function are determined in the Screen Painter or in the Menu Painter. We recommend to assign function code "CS" in the Menu Painter to function key F2 in order to simultaneously assign the double-click function of the mouse to it. This allows you to assign dialog modules to the selection of input or output fields.
    <b><u>Refer thread:</u></b> <i><b>Re: MODULE REQUEST
    Hope that helps!!
    <i><b>*Reward useful answers*</b></i>
    Regards,
    Naveenan.

Maybe you are looking for