Skip to Content
author's profile photo Former Member
Former Member

select option using 2 different fields

hi guyz,

i want to use select option for payroll period & start date is T549Q-BEGDA and end date is T549Q-ENDDA.

Can i use selection screen in this case???????

If yes.....


thanx in advance



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2005 at 12:26 AM


    Yes you can use a Select Option, but you will also need to be a bit creative.

    Try something like this:

    parameters:     p_permo like t549q-permo obligatory,
                    p_pabrj like t549q-pabrj obligarory.
    select-options: s_pabrp for t549q-pabrp.
    ranges: r_datum for sy-datum.
    data: begin of tbl_pabrp occurs 0,
            pabrp  like t549q-pabrp,
            begda  like t549q-begda,
            endda  like t549q-endda,
          end of tbl_pabrp.
    select pabrp begda endda
           into table tbl_pabrp
           from t549q
           where permo eq p_permo and
                 pabrj eq p_pabrj and
                 pabrp in s_pabrp.
    check sy-subrc eq 0.
    * Now TBL_PABRP will have the range of Start and End Dates
    * We want to put these Start / End Dates into the Range 
    * R_DATUM
    loop at tbl_pabrp.
      clear r_datum.
      r_datum-sign   = 'I'.
      r_datum-option = 'BT'.
      r_datum-low    = tbl_pabrp-begda.
      r_datum-high   = tbl_pabrp-endda.
      append r_datum.
    * Now R_DATUM will be a range that contains the Start and 
    * End Dates of a range of Payroll Periods
    * You can now use R_DATUM in the WHERE clause of your 
    * SELECT statements

    Hope this helps.



    PS. Kindly assign Reward Points to the posts you find helpful.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.