Make (LDB)PNP Fields obligatory on selection-screen

I am using LDB PNP.. I want to make some fields of PNP as obligatory. How Can I do that?
So far I am doing the following...
<b>Initialization.
PNPABKRS-LOW = '?'.
Append PNPABKRS.
At selection-screen.
if PNPABKRS-LOW is initial.
PNPABKRS-LOW = '?'.
Message e100(z01).
endif.</b>
What you suggest ?
Thanks
Message was edited by: Saquib Khan

You have to do this way,
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF SCREEN-NAME = 'PNPABKRS-LOW '.
      SCREEN-REQUIRED = 1.
      MODIFY SCREEN.
    ENDIF.
ENDLOOP.

Similar Messages

  • PCH ldb - hiding fields on standard selection screen

    Hi,
    I am using PCH ldb in my report. The standard selection screen which appears initially, does not show us the "object selection period" fields directly (it is hidden initially). It is displayed only after the "other period" button is clicked.
    The requirement is that the "object selection period" fields should be displayed directly without requiring the user to click on the "other period" button.
    When using PNP ldb, it is possible to create a report category and hence this can be achieved in PNP. But i am unable to find any solution for the same in PCH ldb.
    Does anyone have some idea about implementing the same.

    Hi Vikram,
    There are no report categories for PCH.
    If you enter some values in the dynpro variables it will jump there automatically.
    REPORT  zmf_pch.
    TABLES: objec.
    INITIALIZATION.
    pchobeg  = sy-datum.
    pchoend  = sy-datum.
    GET objec.
    Regards,
    Michael

  • How to Add a new fields in the selection screen of LDB.

    Hi All,
    I want to add a new fields in the selection screen of LDB & then i need to select the data for that fields.
    So could you please tell me for that where i need to add the code for selecting the data.
    Thanks
    Roli

    Hi
    welcome to SDN forum
    If you are designing your own LDB with your own tables you can define tree structure and then the selection screen for the tables
    if you wants to modify the std LDB of SAp means take the access key and to modify that code
    if you add the extra field you have to modify the where conditions in the code also
    see the doc
    A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
    LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
    Less coding s required to retrieve data compared to normal internel tables.
    Tables used LDB are in hierarchial structure.
    Mainly we used LDBs in HR Abap Programming.
    Where all tables are highly inter related so LDBs can optimize the performance there.
    Check this Document. All abt LDB's
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
    GO THROUGH LINKS -
    http://www.sap-basis-abap.com/saptab.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    Re: **LDB**
    www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
    www.sap-img.com/abap/abap-interview-question.htm
    www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
    Gothru the blog which provides info on LDB's:
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    Sample code
    TABLES: SPFLI,
    SFLIGHT,
    SBOOK,
    SCARR.
    START-OF-SELECTION.
    GET SPFLI.
    WRITE:/ ’SPFLI: ’, SPFLI-CARRID, SPFLI-CONNID,
    SPFLI-AIRPFROM, SPFLI-AIRPTO.
    GET SFLIGHT.
    WRITE:/ ’ SFLIGHT: ’, SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
    GET SBOOK.
    WRITE:/ ’ SBOOK: ’, SBOOK-CARRID, SBOOK-CONNID,
    SBOOK-FLDATE, SBOOK-BOOKID.
    GET SFLIGHT LATE.
    WRITE:/ ’ GET SFLIGHT LATE: ’, SFLIGHT-FLDATE.
    Regards
    anji

  • MAKING A FIELD MANDATORY IN SELECTION SCREEN

    HOW TO MAKE THE SELECTION SCREEN FIELDS MANDATORY USING LOOP AT SCREEN STATEMENT.I TRIED USING IT WITH AT SELECTION SCREEN EVENT.BUT IT WAS NOT WORKING.SO CAN ANY OF U PROVIDE SAMPLE CODE FOR THIS.
    THANKS.

    Hi,
    You can do it simple:
    AT SELECTION-SCREEN ON s_matnr.
    IF s_matnr IS INITIAL.
        MESSAGE e055(00).
    Make an entry in all required fields
    ENDIF.
    (s_matnr: is a field on the selection screen)
    Good luck.
    Gilad Hubara.

  • Generate fields on the selection screen automatically

    Hi,
    I'd like create some fields on my selection screen automatically using an information filled in the selection screen too.
    For instance : I enter a table name, and my selection screen is autommatically filled with all the primary key fields of this table.
    Do know, how i can do that?
    Thx in advance.

    u have to write the code under the event..
    AT SELECTION-SCREEN OUTPUT.
    there u can make some fields invisible or invisible, based on any value entered on the selection screen.
    u can write the same in the below way..
    if pa_char eq 'X'.
        LOOP AT SCREEN.
    if screen-name = 'FILED_NAME'.
            screen-invisible = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    else.
    LOOP AT SCREEN.
    if screen-name = 'FILED_NAME'.
            screen-invisible = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    endif.
    wat this will do is when u enter value 'X' in the parameter pa_char, the screen field with name FIELD_NAME will become visible..
    Hope this idea helps u out...

  • How to add * wild card to a specific field on the selection-screen.

    Hello,
    How to add a * WIld card to a field in selection screen.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_STCTS FOR G_STCTS OBLIGATORY,      "NUMBER SCHEME
                     S_AT20A FOR G_ATTR20A,    "SUBSTANCE ID
    SELECTION-SCREEN END OF BLOCK B1.
    I need to add Wild card functionality to Number scheme field S_STCTS on selection-screen.
    Any suggestions would be apprecaited..
    Regards,
    Kittu

    Hi Kittu,
    Here is one sample code:-
    select-option : s_name like kna1-name1.
    start-of-selection.
    if s_name-low = '*'.
    select * from kna1 into table it_kna1.
    elseif s_name-low = 'pat*' or s_name-low = 'pat'.
    select * from kna1 into table it_kna1 where name1 like 'Pat%'.
    endif.
    In case of wild card Select should be :-
    select * from <dbtab> where <field> like 'P%'.
    You can also use RANGES in your Code.
    E.g. RANGES: R_OBJNR FOR JEST-OBJNR
    R_OBJNR-SIGN = 'I'.
    R_OBJNR-OPTION = 'CP'.
    R_OBJNR-LOW = 'K1*'.
    R_OBJNR-HIGH = 'K2*'.
    Hope this helps.
    Thanks & Regards
    Jitendra Gujarathi

  • Adding field in the selection-screen of a zprogram

    hi gurus,
    i have to add field in the selection-screen of oppurtunities. in database i have a field salesvalues, some of oppurtunity guids have this field value. first i need to add in selection-screen in this alv report. and fetch the data from ztable into required field . if the input fields of the salesvalues field id filled, then filter the global  guids(from global table which had the guid values already) with this guids related to salesvalues. and if one single guid mathes to 2 values of salesvalues then concatenate 2 values with comma and display in single field. if select-options are blank then fetch all opportunity guids which have salesvalues. pls give solution.

    Hi Srini,
    Thanks for your Reply
    I have kept 01 against the field BSEG-AUGDT and selected the preselect check box also.
    But still that field is not visible in the dynamic selection screen.
    Thanks
    Ajay.D

  • Functional area(FKBER( field in the selection screen))

    Hi,
       I have a requirement to add functional area field in the selection screen for a report painter report. This report using library 1VK and table 'CCSS'. I added functional area field in the general data selection . After the execution of report with functional area field filled with value. report not giving any output. do i need to maintain any setting to achieve?
    Regards,
    Palani

    Hi,
    How you have filled the values?
    It is 16 CHAR long.

  • Functional area(FKBER field in the selection screen of the report painter))

    Hi,
    I have a requirement to add functional area field in the selection screen for a report painter report. This report using library 1VK and table 'CCSS'. I added functional area field in the general data selection . After the execution of report with functional area field filled with value. report not giving any output. do i need to maintain any setting to achieve?
    Regards,
    Palani

    1. Call GR22 and click "Characteristics".
    2. Check FKBER and assign a position number to it.
    3. Save and close the library.
    4. Call your report in GRR2 and you should now see FKBER as an available characteristic.
    5. Use it in the General Data Selection or as a Lead Column, as per requirement.
    Or,
    1. Call GR21 and create a custom library. Provide a name and description and also provide a library you can copy from (scan for the best-fit library).
    2. Now follow the steps 2 through 5 above to achieve your result.
    Hope this helps.
    Cheers.

  • I need below fields at my selection screen.From which table we can find the

    Sales Org > only one selection field
    Division > only one selection field
    Channel > from u2013 to fields
    Sales Office Channel > from u2013 to fields
    Sales Rep Channel > from u2013 to fields
    User ID of the CSR Channel > from u2013 to fields
    Customer Channel > from u2013 to fields
    Material Channel > from u2013 to fields
    Date: Channel > from u2013 to fields
    I need these fields at my selection screen.From which tables I find these things.I need this logic also.

    I need help

  • I have mapped the fields on the selection-screen  to the BDC on transaction

    I have mapped the fields on the selection-screen  to the BDC on transaction F110.
    When I am selecting a particular any value in select-option on the selection screen, it is giving some default value and the value given by me,for example:
    Payment methods:C
    but in BDC recording for F110 Payment methods:IEQC when the programs is running in foreground mode.
    how can I rectify it?

    This is because payment methods may be a table and what you see IEQC is actually, I for include, EQ for equal and C as your payment method. This is standard structure for ranges or select-options. You can use variable-low which will give you only C.

  • Hiding and Unhiding Fields On The Selection Screen

    Hi Guys/Dolls
    I've managed to grey out and hide some fields on a selection screen within the AT SELECTION-SCREEN OUTPUT section but don't know how to re-instate them.
    basically on initial entry of the screen some fields are hidden but once I enter some pre-requisite data I need to display them but in a greyed out manner.
    I've done the first bit but don't know how to do the 2nd bit i.e re-display the fields.
    Any help would be appreciated.
    Many thanks in advance.
    Raj
    My code is as follows:-
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION POS_LOW.
    PARAMETERS: begcalsh LIKE t549q-begda MODIF ID pe4.
    SELECTION-SCREEN COMMENT (1) text-199 FOR FIELD endcalsh
    MODIF ID pe4.
    PARAMETERS: endcalsh LIKE t549q-endda MODIF ID pe4.
    SELECTION-SCREEN POSITION POS_HIGH.
    PARAMETERS: begrefsh LIKE t549q-begda MODIF ID pe5.
    SELECTION-SCREEN COMMENT (1) text-199 FOR FIELD endrefsh
    MODIF ID pe5.
    PARAMETERS: endrefsh LIKE t549q-endda MODIF ID pe5.
    SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.
    * Grey out the parameters.
      PERFORM params_grey_in_out USING 'false' 'PE4'.
      PERFORM params_grey_in_out USING 'false' 'PE5'.
    * Hide the parameters.
      PERFORM params_show_hide USING 'false' 'PE4'.
      PERFORM params_show_hide USING 'false' 'PE5'.
    AT SELECTION-SCREEN.
      PERFORM params_show_hide USING 'true' 'PE4'.
      PERFORM params_show_hide USING 'true' 'PE5'.
    *&      Form  params_grey_in_out
    FORM params_grey_in_out USING value(iv_triggering_param)
                                     value(iv_screen_group).
    *this form activates fields with MODIF ID = IV_SCREEN_GROUP
    *if IV_TRIGGERING_PARAM eq TRUE and greys them out otherwise.
      DATA lx_input LIKE screen-input.
      IF iv_triggering_param EQ 'true'.
        lx_input = 1.
      ELSE.
        lx_input = 0.
      ENDIF.
      LOOP AT SCREEN.
        IF screen-group1 EQ iv_screen_group.
          screen-input = lx_input.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " params_grey_in_out
    *&      Form  params_show_hide
    FORM params_show_hide USING value(iv_triggering_param)
                                     value(iv_screen_group).
    *this form displays fields with MODIF ID = IV_SCREEN_GROUP
    *if IV_TRIGGERING_PARAM eq TRUE and hides them otherwise.
      DATA lx_active LIKE screen-active. "(1) type n.
      DATA lx_invisible LIKE screen-active. "(1) type n.
      IF iv_triggering_param EQ 'true'.
        lx_active = 1.
        lx_invisible = 0.
      ELSE.
        lx_active = 0.
        lx_invisible = 1.
      ENDIF.
      LOOP AT SCREEN.
        IF screen-group1 EQ iv_screen_group.
          screen-invisible = lx_invisible.
          screen-active = lx_active.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " params_show_hide

    hi u use this logic
       LOOP AT SCREEN.
          IF screen-group1 = 'GR3'.
            screen-active = 1.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'GR2'.
            screen-invisible = 0.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

  • Currency field on a selection screen of type 'DMBTR'.

    Hello ABAPers,
          Could you please tell me how to do it?
           I have a currency field on a selection screen of type 'DMBTR'.
           When i input and press the enter key ,i want the value to be displayed in the following style.
              1. CURRENCY     EQ    'JPY'
                    EX:
                          Value before pressing EnterKey =   123456 
                          Value after pressing   EnterKey =    123,456
                      i.c  the value should be displayed without decimal point
            2. CURRENCY      NE    'JPY'
                    EX:
                          Value before pressing EnterKey =   123456 
                          Value after pressing   EnterKey =    123,456.00
                      i.c  the value should be displayed with decimal point
          Note:The above trick has already been done on a standard dynpro screen of Tr.Code FB60 and Field 'Amount'.
    <removed_by_moderator>
    Thanks and Regards,
    Mohan
    Edited by: Govindasamy Mohan on Oct 8, 2009 6:22 PM
    Edited by: Julius Bussche on Oct 9, 2009 1:36 PM

    Hi ABAP Lover,
       Thanks a lot for your reply.
       I had the same idea as yours like using data type 'P'.
      But, the problem is  that there is only one currency field on the screen .There is also a field of 'Company Code'.
    Both fields are mandatory .
    Hence,the requirement is  to convert the  currency value to the currency of the company code which is input .
    The conversion  should yield the following output on the screen after pressing the enter button.
    1. When currency EQ  'JPY' ,  the value should be displayed without decimal point
      2.When currency NE  'JPY' ,  the value should be displayed with decimal point
    I am very sorry for not explaining you clearly in my first posting.
    Thanks and Regards,
    Mohan

  • Maintaing a default value for a particular field in the selection screen

    Hi all,
    How to maintain a default value for a particular field in the Selection Screen of a Standard report
    Regards
    Ajay

    >
    ajay babu wrote:
    > Hi all,
    >
    > How to maintain a default value for a particular field in the Selection Screen of a Standard report
    >
    > Regards
    > Ajay
    Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
    Regards
    Rajesh.

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

Maybe you are looking for

  • Determine of Tax Code for Country/Product Category - Table handling

    Dear Experts, in SRM 7.0, CS, i am facing the following requirement regarding tax codes: We have users from different countries using SRM. These different countries have different tax codes that are to be used for legal reasons. My question is, how i

  • Cannot connect lumia 1020 to PC

    Hi, I just bought the lumia 1020 and have been trying to connect it to my windows 7 professional PC. Unlike a similar problem that involves a yellow warning sign on the portable device icon, in my case the portable device icon itself never shows up i

  • Idisk always open new window in icon mode even though finder doesnt

    My idisk always open up a new window each time i click on a folder so if i am going into several folders deep i end up with loads of windows open. I've changed the main setting for this and it doesn't do it in finder normally with folders in my profi

  • Ejb lookup throughout apache's mod_wl20

    Hy, my problem is: -I'm supposed to retrieve from a remote client a home stub of a clusterable ejb deployed on a cluster, whose addresses (list of...), due to administrative choices, are not visible from other hosts; even within the same network. -Si

  • Error 1406 NoExplorer for the Key \Software...

    I had been updating previous versions and there was no problem. But this time updating to Adobe 11 is a huge one. It started some 2-3 weeks ago and since then no solution. I was advised to go to the key and change permitting the owner to have all rig