Mandatory field in report

Hi,
I have a date field on report.
Now this needs to be mandatory and report should be run in batch mode with a variant.
Also when the report is run the first time the date should not be taken from the selection screen input but from TVARV, this is fine, logic can be written for this.
However since date is a mandatory field and the only way to check whether user input or TVARV needs to be selected is the FIRST ot the subsequesnt runs of the report.
How to find out if the report has run first time, it is being scheduled as a batch job with a variant.

Hello,
As you want to make the DATE field in your report as mandatory and will be picking up the last run date (DATE) from the same table whenever your run the table then while you are fetching the date from TVARV table , for the first time as there is no data stored in TVARV table for your program your query will fail. In this case i.e. sy-subrc = 4, please create a enrty in the same table.
I am assuming that you will be updating the DATE (last run date) in TVARV table everytime after the successfull execution of the program.
Hope it helps.
Thanks,
Jayant.

Similar Messages

  • Mandatory Field in ALV Grid

    Hello,
    i've a editbale alv grid.
    Is it possible to set a field/colum as mandatory field?
    Best regards,
    TomSd

    Hi,
    Have a look at the report BCALV_EDIT_03.
    In this report the program logic is such that if the user enters an incorrect value an error is displayed.
    Instead you can check if the field of your ALV filelds are null and validate them accordingly.
    Regards,
    Sandeep

  • Value for mandatory field is missing

    Hello again,
    I created an application how descripted in 95 Implementing Remote Persistency with CAF and RFCs (Service).
    The problem occurred when I try to search for an entry. I get the following error:
    german: "ERROR. Wert für Pflichtattribut ... fehlt:"
    english: "Value for mandatory field ... is missing"
    The option mandatory=true seems to be the problem. But I need this option to make these fields available for the mapping with the create method. After I while of tinkling I find out that the errormessage appears when I set more than to fields to mandatory.
    Do anybody know how to resolve this error?
    Thanks!

    Hi Martin,
    I reported this issue to development and they said that this is "by design".  Here is the recommendation.
    1.  set the "Mandatory" flag to false for each attribute that is not required by your external interface.
    2.  perform mappings for only the mandatory attributes in the create method.
    3.  perform mappings for mandatory and optional attributes in the update method.  The update method allows you to map optional attributes.
    4.  At runtime, first call the create method with only the required attributes, then call the update method to fill any optional attributes. 
    This should eliminate the error that you get in the Service Browser.
    Best Regards,
    Austin.

  • Behaviour of radiobutton and mandatory fields in a selection screen

    Hello all
    In the selection screen in a report , I have one mandatory field F1 and 2 radio button  p_val and p_prov. there's no relationship between p_prov, p_val & F1.
    I have 2 others fields p_dom and p_seg which are active when I select p_val : they are also mandatory when selecting p_val.
    p_prov is the default radiobutton so p_dom and p_seg are inactive when the screen appears
    I have 2 problems :
    1 - First I select p_val (the message for F1 as mandatory appears -> normal) so p_val appears selected but The 2 fields p_dom and p_seg are not active. I would like them to be active even I have not filled F1.
    2- I fill F1then I select p_val, so p_dom and p_seg are active, I fill only p_dom but not p_seg : I select radio button p_prov (the message for p_seg as mandatory appears -> normal) : p_prov appears selected but I don't want it.
    Thanks for your help.
    below the code of selection screen with event at selection-screen output :
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS : p_val RADIOBUTTON GROUP GR2 USER-COMMAND radio.
      SELECTION-SCREEN COMMENT 4(37) text-132.
      SELECTION-SCREEN END OF LINE.
      PARAMETERS : p_dom TYPE GSBER OBLIGATORY MODIF ID SC1.
      PARAMETERS : p_seg TYPE FB_SEGMENT OBLIGATORY MODIF ID SC1.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS : p_prov RADIOBUTTON GROUP GR2 DEFAULT 'X'.
      SELECTION-SCREEN COMMENT 4(37) text-133.
      SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'SC1'.
          IF p_prov = 'X'.
            SCREEN-INPUT = '0'.
            SCREEN-REQUIRED = '0'.
          ENDIF.
          IF p_val = 'X'.
            SCREEN-INPUT = '1'.
            SCREEN-REQUIRED = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.

    hello Jerome,
    Here you go.
    2 things to remember:
       1. Remove the obligatory addition from all fields.
       2. Remove the input required while changing the screen elements.
    PARAMETER: f1 TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : p_val RADIOBUTTON GROUP gr2 USER-COMMAND radio.
    SELECTION-SCREEN COMMENT 4(37) text-132.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS : p_dom TYPE gsber MODIF ID sc1.
    PARAMETERS : p_seg TYPE fb_segment MODIF ID sc1.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : p_prov RADIOBUTTON GROUP gr2 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 4(37) text-133.
    SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'SC1'.
          IF p_prov = 'X'.
            screen-input = '0'.
          ENDIF.
          IF p_val = 'X'.
            screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    AT SELECTION-SCREEN.
      CHECK sy-ucomm <> 'RADIO'.
      IF p_val = 'X'.
        IF p_dom IS INITIAL OR p_seg IS INITIAL.
          MESSAGE 'Fill Mandatory fields' TYPE 'E'.
        ENDIF.
      ENDIF.
      IF f1 IS INITIAL.
        MESSAGE 'Fill F1' TYPE 'E'.
      ENDIF.
    Thanks,
    Jinesh.

  • How to skip a selection screen mandatory field in debugging mode with out changing the code?

    Hi Team,
    In my report there is two fields on selection screen, one is obligatory field , but i just want to execute the report(for testing per pus) with out entering  the data for the mandatory field with out changing the code. could u let me know which event and how to debug the report. or else  in debugging mode how can i change that field as non mandatory field.
    Regards,
    Venkat.

    If the value is not of importance how come it became obligatory in your program?
    Any how you can do one thing...Put some value in your obligatory field, put a debugger point where you are interested in  and use the pencil tool to change the value of the field while debugging. 
    Regards,
    Philip.

  • BAPI_REQUISITION_CHANGE  please suggest the mandatory  fields.

    I am using the Bapi_requisition_change  in se 37 .
    i am inputting the following parameters
    NUMBER                          10032908
      REQUISITION_ITEMS_OLD
    REQUISITION_ITEMS_NEW
    REQUISITION_ACCOUNT_OLD
    REQUISITION_ACCOUNT_NEW.
    but following error is coming while executing the fs.
    Data in REQUISITION_ITEM_OLD for item 00010 does not correspond to current database status
    and also please suggest the mandatory fields for this bapi

    Shashi,
    Try this:
    report z_po_req_create.
    DATA : T_REQUISITION_ITEMS LIKE BAPIEBANC OCCURS 0 WITH HEADER LINE,
    T_RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .
    DATA : E_NUMBER LIKE BAPIEBANC-PREQ_NO.
    T_REQUISITION_ITEMS-DOC_TYPE = 'NB'.
    T_REQUISITION_ITEMS-DEL_DATCAT = '1'.
    T_REQUISITION_ITEMS-DELIV_DATE = '20020626'.
    T_REQUISITION_ITEMS-PLANT = 'P1'.
    T_REQUISITION_ITEMS-STORE_LOC = '01'.
    T_REQUISITION_ITEMS-PUR_GROUP = 'P01'.
    T_REQUISITION_ITEMS-MAT_GRP = '01'.
    T_REQUISITION_ITEMS-PREQ_ITEM = 1.
    T_REQUISITION_ITEMS-MATERIAL = '1MAT1'.
    T_REQUISITION_ITEMS-QUANTITY = 10.
    T_REQUISITION_ITEMS-PREQ_NAME = '123456'.
    T_REQUISITION_ITEMS-PURCH_ORG = '1000'.
    T_REQUISITION_ITEMS-ACCTASSCAT = 'U' .
    T_REQUISITION_ITEMS-VEND_MAT = 'G'.
    APPEND T_REQUISITION_ITEMS.
    CALL FUNCTION 'BAPI_REQUISITION_CREATE'
    EXPORTING
    SKIP_ITEMS_WITH_ERROR =
    IMPORTING
    NUMBER = E_NUMBER
    TABLES
    REQUISITION_ITEMS = T_REQUISITION_ITEMS
    REQUISITION_ACCOUNT_ASSIGNMENT = T_REQ_ACCOUNT_ASSIGNMENT
    REQUISITION_ITEM_TEXT =
    REQUISITION_LIMITS =
    REQUISITION_CONTRACT_LIMITS =
    REQUISITION_SERVICES =
    REQUISITION_SRV_ACCASS_VALUES =
    RETURN = T_RETURN
    REQUISITION_SERVICES_TEXT =
    EXTENSIONIN =
    REQUISITION_ADDRDELIVERY =
    IF NOT E_NUMBER IS INITIAL .
    WRITE:/ 'REQ NO:' , E_NUMBER , 'CREATED'.
    ELSE.
    LOOP AT T_RETURN.
    WRITE T_RETURN-MESSAGE.
    ENDLOOP.
    ENDIF.
    Reddy

  • How to make input field as mandatory field in sub screen

    Hi All,
           I need to display the input selection parameters in tab strip sub screen. The input screen is not giving an error while processing with blank values, but I made the input field as required in sub screen input filed settings. Can some one please help me how to make the input field as mandatory field in sub screen.
    Thanks in advance.
    Regards,
    Kannan

    Hi Kannan,
        Try this out.
    1. Goto screen painter
    2. Enter the program name and screen number ( screen # 1000 -  in case if its  a custom report prg)
    3. Double click on the field which u`ve got to make mandatory.You`ll get Screen painter attributes window.
    4. U`ll find three tabs here - Dict, Program, Display
    5. Go to Program tab, and change the first attribute - Input field`s input value as "Required".
    6. Save and activate it.
    7. Now execute ur program and this should make ur field as mandatory on the screen.
    This works with input fields, but I`m not sure about the input field in tab strip control.
    Hope this helps
    Regards,
    Farhana

  • Mandatory field "Involved Person" must be filled

    Dear Experts
    In EHSM 5.0 while trying to create Report - Incident - Simplified, receiving error - Mandatory field "Involved Person" must be filled. I have check similar post on this and as per that EHHSSPIID is being maintained for internal number range.
    This issue is triggering either I click "send"  w/o entering data for who was injured or attempt to add details for injured person.
    Regards
    Santosh

    Dear Sunil
    Few  OSS Notes(1526402,1534362,1581936)  which are related to HR Integration & Reading person data from HRMS systems.  Refer EHSM 4.0 Master Guide (Page No: 10) . These Notes Implementation is mandatory during Upgrade.
    Balajee

  • Mandatory field quey

    i have a mandatory field in my report
    suppose i press exit or back button without entering data in mandatory field will that exetute or it will exit only when data is entered in that field
    is this also same in case of module pool screen

    In Reports: If you click Exit or Back button without filling the mandatory field, the system will allow you to exit from the screen .
    In Module pool program : The back button wont allow to go back(as per SAP standard), if the mandatory field is not filled. But for the Exit button in pf status if the functional type is declared as 'E'  (Exit command )is given and if you have written a module in PAI like MODULE <modulename>AT EXIT-COMMAND.
    MODULE <modulename> INPUT.
      CASE OK_CODE.
        WHEN '<function code>'.                     
          LEAVE PROGRAM.
    ENDCASE.
    it will allow you to exit from the screen.
    Edited by: Jeniphin on Apr 3, 2008 4:22 PM
    Edited by: Jeniphin on Apr 3, 2008 4:23 PM

  • Selection screen: Mandatory fields

    Hi,
    As we all know, If the fields in a selection screen are mandatory, there will be a small tick box inside that field. Suppose if a field is not mandatory(obligatory), can we still push a tick box symbol to those fields. Is there a way to push the mandatory symbol into non-mandatory fields??

    I think the program still requires slight correction. Please find the below code and help.
    REPORT  ztest_prg.
    TABLES : estrh, plko.
    DATA : c_speci TYPE c,
           c_insp  TYPE c.
    SELECTION-SCREEN: BEGIN OF BLOCK bal WITH FRAME TITLE txt3.
    PARAMETERS: rb_speci  RADIOBUTTON GROUP rd1 . "USER-COMMAND abc
    PARAMETERS: rb_inspl RADIOBUTTON GROUP rd1  DEFAULT 'X'.
    SELECTION-SCREEN: END OF BLOCK bal.
    SELECTION-SCREEN: BEGIN OF BLOCK val WITH FRAME TITLE txt1.
    SELECT-OPTIONS  : s_specif FOR estrh-subid OBLIGATORY MODIF ID r1.
    SELECT-OPTIONS  : s_plant  FOR plko-werks MODIF ID r1 .
    PARAMETER       : p_chgnum TYPE aenr-aennr MODIF ID r1.
    SELECTION-SCREEN: END OF BLOCK val.
    SELECTION-SCREEN: BEGIN OF BLOCK upd WITH FRAME TITLE txt2.
    SELECT-OPTIONS: s_insp FOR plko-plnnr  OBLIGATORY MODIF ID r2.
    SELECT-OPTIONS: s_plan  FOR plko-werks  MODIF ID r2.
    PARAMETERS:     p_chgn TYPE aenr-aennr MODIF ID r2.
    SELECTION-SCREEN: END OF BLOCK upd.
    INITIALIZATION.
      txt1 = 'Specifications'.
      txt2 = 'Inspection Plans'.
      txt3 = 'Selection'.
    AT SELECTION-SCREEN OUTPUT.
      IF rb_speci = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'R1'.
            screen-active = 1.
          IF screen-name = 'S_SPECIF'.
           screen-required = '2'.
          ENDIF.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'R2'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF
      rb_inspl = 'X'.
      REFRESH screen.
      MODIFY SCREEN.
        LOOP AT SCREEN.
          IF screen-group1 = 'R2'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'R1'.
            IF screen-name = 'S_SPECIF'.
          screen-required = '1'.
    *      MODIFY SCREEN.
        ENDIF.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    START-OF-SELECTION.
      PERFORM f_validation.
      IF rb_speci = 'X'.
        CHECK  c_speci IS INITIAL.
      ENDIF.
      IF rb_inspl = 'X'.
        CHECK  c_insp IS INITIAL.
      ENDIF.
      WRITE:/10(10) 'ITS DONE'.

  • WD_BADI_DOMODIFYVIEW - dynamically set screen element as mandatory field

    Hi,
    I would like to use WD_BADI_DOMODIFYVIEW to dynamically set a standard screen element on my Webdynpro as a mandatory field. Does anyone know which method in which class that I can use to set the status from 'Normal field' to 'required' ?
    This is a for standard SRM webdynpro screen. Unfortunately I could not get the configuration to set the standard metadata field as a mandatory field.
    Also this standard field does not have an existing binding to a context element to manipulate the status of the field. Hence I need to find a method that can directly change the attribute of this standard screen element to mandatory. I do not want to modify the webdynpro to change the status of the field to 'required'.
    <promise removed by moderator>
    Thanks
    Liam
    Edited by: c958209 on Apr 28, 2011 1:32 PM
    Edited by: Thomas Zloch on Apr 28, 2011 4:58 PM

    Hi Kiran,
    I think I understand what you are suggesting now. The trouble is IF_V_SC_DOFC_I_LIMITEM (the view I'm trying to enhance) does not exist in the BAdI.
    When I go to the attributes of the View of the Webdynpro component that I'm trying to enhance I do see WD_THIS refto IF_V_SC_DOFC_I_LIMITEM.
    It's just that in the BAdI WD_BADI_DOMODIFYVIEW this WD_THIS is not available and trying to define it like below does not work.
        Make Product Category field mandatory
          lo_node = wd_context->get_child_node( co_item_data ).
          lo_value = lo_node->get_element( ).
        Get value of context element SH_CATEGORY_ID
          lo_value->get_attribute( EXPORTING name  = co_sh_category_id
                                   IMPORTING value = lv_sh_category_id ).
          IF lv_sh_category_id IS INITIAL.
            DATA: lo_message_manager TYPE REF TO if_wd_message_manager.
            DATA lo_api_controller     TYPE REF TO if_wd_controller.
            DATA wd_this TYPE REF TO  if_v_sc_dofc_i_limitem.           <================ This gives a syntax error "The type          IF_V_SC_DOFC_I_LIMITEM is unknown
            lo_api_controller ?= wd_this->wd_get_api( ).
            CALL METHOD lo_api_controller->get_message_manager
              RECEIVING
                message_manager = lo_message_manager.
          Report message
            CALL METHOD lo_message_manager->report_attribute_error_message
              EXPORTING
                message_text   = 'Please fill the Document Date'
                element        = lo_value
                attribute_name = 'SH_CATEGORY_ID'.
          ENDIF.

  • Pricing Procedure: requriement routine and mandatory field

    Hi,
    In pricing procedure, which setting has higher proirty between logic included in requirement routine or mandatory field configuration?
    I have a condition type to store list price (copy of PR00), and it is configured as mandatory.
    However, I want to include a requirement routine saying that 'Only for a specific order type and sales organization, set this condition type PR00 as optional.
    That way I can set this PR00 as possible to override the amount.
    Any ideas?
    Thank you in advance.
    Pinkytak

    I agree with all other solutions, but pricing anyway is very flexible to have to make routines.
    If you want just to overwrite the amount, mandatory or not has little to do. Just allow manual changes in the condition type properties.
    But if i understood your requirement correctly, i propose,  you let the mandatory condition type run normally, and  in certain sales type you insert another one, which with condition exclusion, will "deactivate" the mandatory one. In that way, you'll keep the initial one for reporting and statistical reasons.
    If you come back with your business requirement (not the technical one) i'm confident that we'll come up with better solutions.
    Regards
    Agis
    Edited by: Agis Katsafouros on Apr 20, 2010 1:50 PM

  • To Generate msg if mandatory field is not filled

    Hi Experts,
        I want to display msg if mandatory field is not filled , for that i called
    CALL METHOD L_MESSAGE_MANAGER->REPORT_ATTRIBUTE_ERROR_MESSAGE
      EXPORTING
        MESSAGE_TEXT        = ' PLEASE FILL ALL MANDATORY FIELD '
        ELEMENT             =  ELEM_GENRAL
        ATTRIBUTE_NAME      =  F_NAME
    But i am getting error that F_NAME is not an attribute name but it is attribute name only
    What i should do , Please Help

    Hi Neeraj,
    Remove Required property of that inputfield make it NORMAL.
    For example your input field is INPUT...
    if input is initial.
    * report message
              CALL METHOD lo_message_manager->REPORT_ATTRIBUTE_ERROR_MESSAGE
                EXPORTING
                  MESSAGE_TEXT   = 'Pick Quantity Should not be 0... '
                  ELEMENT        =  wa_temp // element
                  ATTRIBUTE_NAME = 'PICK_QTY'.   // Attribute name( name used in context )
    endif.
    If you not fill input it will raise error message by hilighting the input field.
    Cheers,
    Kris.

  • Remove mandatory field from transaction KRMI

    Hi,
    In transaction KRMI, there are fields material and plant.
    Material is a mandatory field. However, the user wants to see all the materials for a plant - not specific materials. They only want to enter the plant.
    Is it possible to have material as an un-mandatory field? What are my options? Is guixt a possible solution?
    If nothing else works, I would have to rebuild the report or copy & customize it.
    Let me know.
    Thanks.

    Hi John,
    SAP GuiXT resides at the presentation layer and defines the layout of the R/3 screen by series of commands in SCRIPT file.
    SAP GuiXT is not the correct solution in your case, as this is machine dependent and you need to provide SCRIPT on each and every user machine.This can be only done in case your client has already implemented it.
    You should try to find Screen Exit , if the same is not avaliable then proceed with creation of Z transaction.
    Hope you understand it.

  • What are the mandatory fields while creation of material master in differen

    what are the mandatory fields while creation of material master in different views?

    Hi Gopi,
      This is purely depends on the function configuration, which would be done MM consultants.  Kindly check with them.
    thanks & regards
    Kishore Kumar Maram

Maybe you are looking for

  • Playing sound

    hi there i want to play sound but i keep getting errors here is the code i am using: try InputStream in = getClass().getResourceAsStream("/fire1.wav"); Player p = Manager.createPlayer(in, "audio/x-wav"); p.start(); catch (MediaException me) { } catch

  • 11g grid - domain name change

    Hi i have installed oracle 11g grid ( both rdbms repository and OMS on the same linux server 5.5) but now my domain name has changed slightly ... do I need to change anything ? does this require full reinstallation of grid ? oracle v 11.2.0.2 I am tr

  • Kenburns and image size

    Well I have been playing with Imovie for the past couple of days trying to trouble shoot. I'm not sure of what I have.. What I know is that I have to resize my images down to 640x640 roughly. If I dont and I apply the KB effect it shimmers (maybe wha

  • Prints coming out with wrong colors

    I am currently running win 7 64 with lightroom 4.3and an Epson Stylus Pro 3880 networked. I also have a HP 2610 as local. When printing to the Epson I get print with a lot of red to the point it looks pink or purple. This is with the color management

  • I'm having a problem getting my pop ups in CS6 InDesign to work when I export to Acrobat.

    I am creating pop ups in a CS6 InDesign Interactive design and when I export the file to Acrobat the pop ups will not work. They work on the 1st page onlybut not in any other page in the interactive piece. I started this document in CS5 and then conv