Making changes to date-related fields

Hi all,
Before i continue, i'd like to thank everyone who helped me develop my first ever ABAP program. However, i am now asked to make changes to it.
Criteria: The input field for PO Date (I_BEDAT) now has to become 2 separate input fields. The first field is where the user has to input the month that they wish to query (I_MONTH1 to I_MONTH2). The second field is where the user has to input the year that they wish to query (I_YEAR).
The following is what i have done so far, without any changes made yet. I'm still reading what the F1 help has to say before i do anything...but if anyone could give me a hint or an idea where to start with, please share it with me...thanks to all in advance
*& Report  ZLPUPO100                                                   *
*& Description : Delivery Evaluation Report                            *
REPORT ZLPUPO100 NO STANDARD PAGE HEADING LINE-SIZE 135 LINE-COUNT 65.
TABLES: EKKO,
        EKPO,
        EKBE,
        EKET.
DATA: BEGIN OF ITAB OCCURS 0,
      EBELN LIKE EKKO-EBELN,  "Purchasing Document Number
      EBELP LIKE EKPO-EBELP,  "Item Number of Purchasing Document
      EINDT LIKE EKET-EINDT,  "Item delivery date
      BUDAT LIKE EKBE-BUDAT,  "Posting Date in the Document
      END OF ITAB.
DATA: BEGIN OF WTAB OCCURS 0,
      EBELN LIKE EKBE-EBELN,  "Purchasing Document Number
      EBELP LIKE EKBE-EBELP,  "Item Number of Purchasing Document
*      EINDT LIKE EKET-EINDT,  "Item delivery date
      BUDAT LIKE EKBE-BUDAT,  "Posting Date in the Document
      END OF WTAB.
DATA V_OVERDUE TYPE I.
DATA COUNT_OVERDUE TYPE I.
DATA COUNT_LINES TYPE I.
DATA V_PERCENTAGE TYPE P DECIMALS 9.
*&    SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
  I_WERKS FOR EKPO-WERKS DEFAULT '6000' NO INTERVALS,  "PLANT
  I_BUKRS FOR EKKO-BUKRS DEFAULT 'GSPC' NO INTERVALS,  "COMPANY CODE
  I_EBELN FOR EKKO-EBELN DEFAULT,   "PO NUMBER
  I_LIFNR FOR EKKO-LIFNR,                              "VENDOR NUMBER
  I_MATNR FOR EKPO-MATNR.                              "MATERIAL NUMBER
  I_BEDAT FOR EKKO-BEDAT.                              "PO DATE
PARAMETERS I_MONTH(2) TYPE D.                         "YEAR
PARAMETERS I_YEAR(4) TYPE D DEFAULT SY-DATUM+0(4).    "MONTH
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE TEXT-002.
PARAMETERS:  P_ONET RADIOBUTTON GROUP RFMT DEFAULT 'X',  "ON-TIME
             P_ODUE RADIOBUTTON GROUP RFMT,  "OVERDUE
             P_ALLP RADIOBUTTON GROUP RFMT,  "BOTH (SORT BY PO NO.)
             P_ALLC RADIOBUTTON GROUP RFMT.  "BOTH (SORT BY CATEGORY)
SELECTION-SCREEN END OF BLOCK 2.
*&    START-OF-SELECTION
START-OF-SELECTION.
    PERFORM WRITE_HEADER.
    PERFORM SELECT_DATA.
END-OF-SELECTION.
*&    FORM WRITE_HEADER
FORM WRITE_HEADER.
WRITE: /1 'REPORT:', SY-REPID,
         118 'PAGE:', SY-PAGNO.
  WRITE: /1 'DATE:', SY-DATUM,
         54 'DELIVERY EVALUATION REPORT',
         118 'USER:', SY-UNAME, 147 ' ' .
  WRITE: / SY-ULINE(148).
ENDFORM.
*&    SELECT_DATA
FORM SELECT_DATA.
*--> IF ON-TIME DELIVERY IS SELECTED
IF P_ONET EQ 'X'.
  PERFORM WRITE_ONET.
*--> IF OVERDUE DELIVERY IS SELECTED
ELSEIF P_ODUE EQ 'X'.
  PERFORM WRITE_ODUE.
*--> IF BOTH IS SELECTED, SORT BY PO NUMBER
ELSEIF P_ALLP EQ 'X'.
  PERFORM WRITE_ALLP.
*--> IF BOTH IS SELECTED, SORT BY CATEGORY (+/-)
ELSE.
  PERFORM WRITE_ONET.
  PERFORM WRITE_ODUE.
ENDIF.
ENDFORM.
*&    FORM WRITE_ONET
FORM WRITE_ONET.
SELECT A~EBELN B~EBELP C~EINDT
        INTO CORRESPONDING FIELDS OF TABLE ITAB
        FROM ( EKKO AS A
               INNER JOIN EKPO AS B
                 ON B~EBELN = A~EBELN
               INNER JOIN EKET AS C
                 ON C~EBELN = B~EBELN AND
                    C~EBELP = B~EBELP AND
                    C~ETENR = '1')
        WHERE B~WERKS IN I_WERKS AND
              B~LOEKZ = ' ' AND
              A~BUKRS IN I_BUKRS AND
              A~BSTYP = 'F' AND
              A~EBELN IN I_EBELN AND
              A~LIFNR IN I_LIFNR AND
              B~MATNR IN I_MATNR AND
              A~BEDAT IN I_BEDAT
        ORDER BY A~EBELN B~EBELP.
*DELETE ADJACENT DUPLICATES FROM ITAB COMPARING ALL FIELDS.
SELECT EBELN EBELP BUDAT
  INTO CORRESPONDING FIELDS OF TABLE WTAB
  FROM EKBE
  WHERE WERKS IN I_WERKS AND
        EBELN IN I_EBELN AND
*        EBELP = ITAB-EBELP AND
        VGABE = '1' AND
        BEWTP = 'E'
  ORDER BY EBELN EBELP.
  FORMAT COLOR 1.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 20 'EVALUATION REPORT FOR ON-TIME DELIVERY ITEMS',
          86 '|'.
  FORMAT COLOR OFF.
  FORMAT COLOR 4.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 5 'PO No.',
          14 '|', 16 'PO Item No.',
          28 '|', 'PO Delivery Date',
          47 '|', 'Actual Delivery',
          65 '|', 'Overdue Days (+/-)',
          86 '|'.
  FORMAT COLOR OFF.
  WRITE: / SY-ULINE(86).
  NEW-LINE.
LOOP AT WTAB.
MOVE WTAB-BUDAT TO ITAB-BUDAT.
MODIFY ITAB TRANSPORTING BUDAT
  WHERE EBELN = WTAB-EBELN AND
        EBELP = WTAB-EBELP.
ENDLOOP.
LOOP AT ITAB.
  IF NOT ITAB-BUDAT IS INITIAL.
*--> IF BUDAT CONTAINS A DATE
    V_OVERDUE = ITAB-BUDAT - ITAB-EINDT.
  ELSE.
*-- IF BUDAT DOES NOT CONTAIN A DATE
    CLEAR V_OVERDUE.
  ENDIF.
*--> DISPLAY ON-TIME ITEMS ONLY
*  IF V_OVERDUE LE 0.
  IF ITAB-BUDAT IS INITIAL.
    DELETE ITAB.
  ELSEIF ITAB-BUDAT > ITAB-EINDT.
    DELETE ITAB.
  ELSE.
  WRITE: /1  '|', 3 ITAB-EBELN,   "PO NO
          14 '|', 19 ITAB-EBELP,  "PO ITEM NO
          28 '|', 33 ITAB-EINDT,  "PO DELIVERY DATE
          47 '|', 51 ITAB-BUDAT,  "ACTUAL DELIVERY DATE
          65 '|', V_OVERDUE,      "OVERDUE DAYS
          86 '|'.
*  WRITE: / SY-ULINE(86).
  ENDIF.
ENDLOOP.
  WRITE: / SY-ULINE(86).
ENDFORM.
*&    FORM WRITE_ODUE
FORM WRITE_ODUE.
SELECT A~EBELN B~EBELP C~EINDT
        INTO CORRESPONDING FIELDS OF TABLE ITAB
        FROM ( EKKO AS A
               INNER JOIN EKPO AS B
                 ON B~EBELN = A~EBELN
               INNER JOIN EKET AS C
                 ON C~EBELN = B~EBELN AND
                    C~EBELP = B~EBELP AND
                    C~ETENR = '1')
        WHERE B~WERKS IN I_WERKS AND
              B~LOEKZ = ' ' AND
              A~BUKRS IN I_BUKRS AND
              A~BSTYP = 'F' AND
              A~EBELN IN I_EBELN AND
              A~LIFNR IN I_LIFNR AND
              B~MATNR IN I_MATNR AND
              A~BEDAT IN I_BEDAT
        ORDER BY A~EBELN B~EBELP.
*DELETE ADJACENT DUPLICATES FROM ITAB COMPARING ALL FIELDS.
SELECT EBELN EBELP BUDAT
  INTO CORRESPONDING FIELDS OF TABLE WTAB
  FROM EKBE
  WHERE WERKS IN I_WERKS AND
        EBELN IN I_EBELN AND
*        EBELP = ITAB-EBELP AND
        VGABE = '1' AND
        BEWTP = 'E'
  ORDER BY EBELN EBELP.
  FORMAT COLOR 1.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 20 'EVALUATION REPORT FOR OVERDUE DELIVERY ITEMS',
          86 '|'.
  FORMAT COLOR OFF.
  FORMAT COLOR 4.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 5 'PO No.',
          14 '|', 16 'PO Item No.',
          28 '|', 'PO Delivery Date',
          47 '|', 'Actual Delivery',
          65 '|', 'Overdue Days (+/-)',
          86 '|'.
  FORMAT COLOR OFF.
  WRITE: / SY-ULINE(86).
  NEW-LINE.
LOOP AT WTAB.
MOVE WTAB-BUDAT TO ITAB-BUDAT.
MODIFY ITAB TRANSPORTING BUDAT
  WHERE EBELN = WTAB-EBELN AND
        EBELP = WTAB-EBELP.
ENDLOOP.
LOOP AT ITAB.
ADD 1 TO COUNT_LINES.
ENDLOOP.
LOOP AT ITAB.
  IF NOT ITAB-BUDAT IS INITIAL.
*--> IF BUDAT CONTAINS A DATE
    V_OVERDUE = ITAB-BUDAT - ITAB-EINDT.
  ELSE.
*-- IF BUDAT DOES NOT CONTAIN A DATE
    CLEAR V_OVERDUE.
  ENDIF.
*--> DISPLAY OVERDUE ITEMS ONLY
  IF V_OVERDUE < 0.
*    ADD 1 TO COUNT_OVERDUE.
    DELETE ITAB.
  ELSEIF ITAB-BUDAT = ITAB-EINDT.
    DELETE ITAB.
  ELSE.
    ADD 1 TO COUNT_OVERDUE.
  WRITE: /1  '|', 3 ITAB-EBELN,   "PO NO
          14 '|', 19 ITAB-EBELP,  "PO ITEM NO
          28 '|', 33 ITAB-EINDT,  "PO DELIVERY DATE
          47 '|', 51 ITAB-BUDAT,  "ACTUAL DELIVERY DATE
          65 '|', V_OVERDUE,      "OVERDUE DAYS
          86 '|'.
*  WRITE: / SY-ULINE(86).
  ENDIF.
ENDLOOP.
  WRITE: / SY-ULINE(86).
  NEW-LINE.
  WRITE: /1  '|', 'Total Overdue Delivery Items: '.
  FORMAT COLOR 3.
  WRITE: COUNT_OVERDUE.
  FORMAT COLOR OFF.
  WRITE: 86 '|'.
COMPUTE V_PERCENTAGE = ( COUNT_OVERDUE * 100 ) / COUNT_LINES.
  WRITE: /1 '|', 'Percentage (%) Over All Deliveries: '.
    FORMAT COLOR 3.
    WRITE: V_PERCENTAGE DECIMALS 2.
  FORMAT COLOR OFF.
  WRITE: 86 '|'.
  WRITE: / SY-ULINE(86).
ENDFORM.
*&    FORM WRITE_ALLP
FORM WRITE_ALLP.
SELECT A~EBELN B~EBELP C~EINDT
        INTO CORRESPONDING FIELDS OF TABLE ITAB
        FROM ( EKKO AS A
               INNER JOIN EKPO AS B
                 ON B~EBELN = A~EBELN
               INNER JOIN EKET AS C
                 ON C~EBELN = B~EBELN AND
                    C~EBELP = B~EBELP AND
                    C~ETENR = '1')
        WHERE B~WERKS IN I_WERKS AND
              B~LOEKZ = ' ' AND
              A~BUKRS IN I_BUKRS AND
              A~BSTYP = 'F' AND
              A~EBELN IN I_EBELN AND
              A~LIFNR IN I_LIFNR AND
              B~MATNR IN I_MATNR AND
              A~BEDAT IN I_BEDAT
        ORDER BY A~EBELN B~EBELP.
*DELETE ADJACENT DUPLICATES FROM ITAB COMPARING ALL FIELDS.
SELECT EBELN EBELP BUDAT
  INTO CORRESPONDING FIELDS OF TABLE WTAB
  FROM EKBE
  WHERE WERKS IN I_WERKS AND
        EBELN IN I_EBELN AND
*        EBELP = ITAB-EBELP AND
        VGABE = '1' AND
        BEWTP = 'E'
  ORDER BY EBELN EBELP.
  FORMAT COLOR 1.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 20 'EVALUATION REPORT FOR ALL DELIVERY ITEMS',
          86 '|'.
  FORMAT COLOR OFF.
  FORMAT COLOR 4.
  WRITE: / SY-ULINE(86).
  WRITE: /1  '|', 5 'PO No.',
          14 '|', 16 'PO Item No.',
          28 '|', 'PO Delivery Date',
          47 '|', 'Actual Delivery',
          65 '|', 'Overdue Days (+/-)',
          86 '|'.
  FORMAT COLOR OFF.
  WRITE: / SY-ULINE(86).
  NEW-LINE.
LOOP AT WTAB.
MOVE WTAB-BUDAT TO ITAB-BUDAT.
MODIFY ITAB TRANSPORTING BUDAT
  WHERE EBELN = WTAB-EBELN AND
        EBELP = WTAB-EBELP.
ENDLOOP.
LOOP AT ITAB.
  IF NOT ITAB-BUDAT IS INITIAL.
*--> IF BUDAT CONTAINS A DATE
    V_OVERDUE = ITAB-BUDAT - ITAB-EINDT.
  ELSE.
*-- IF BUDAT DOES NOT CONTAIN A DATE
    CLEAR V_OVERDUE.
  ENDIF.
*--> DISPLAY BOTH ON-TIME AND OVERDUE ITEMS
  WRITE: /1  '|', 3 ITAB-EBELN,   "PO NO
          14 '|', 19 ITAB-EBELP,  "PO ITEM NO
          28 '|', 33 ITAB-EINDT,  "PO DELIVERY DATE
          47 '|', 51 ITAB-BUDAT,  "ACTUAL DELIVERY DATE
          65 '|', V_OVERDUE,      "OVERDUE DAYS
          86 '|'.
*  WRITE: / SY-ULINE(86).
ENDLOOP.
  WRITE: / SY-ULINE(86).
ENDFORM.

Hi Bernard,
congratulations to your first ever ABAP program.
Looks pretty good. I assume your question refers to
the declaration of your both new fields.
The data type 'D' already automatically declares a field
as a character field of length 8. You should declare
I_MONTH as type C length 2 and I_YEAR as length 4.
Better yet: Let I_MONTH refer to the datatype MONTH and
declare it as a listbox-parameter
(like: I_MONTH type MONTH AS LISTBOX). This has the advantage of having allowed values in your parameter listbox, coming from SAP standard. Unfortunetaly there is nothing like that for year and it would probably lead to far to describe how to create a set of allowed values for this parameter on your own.
The second problem you might have is how to execute a proper selection on this. One of maybe 10 different ways to do that would be to leave the I_BEDAT selewct-option as it is but to hide it from the selection screen and fill it automatically with what you have in your both new parameters. Select-Options are stored internally as a table that you append a line to, as follows:
Fill the LOW-value (FROM-value in selection) with
the first day of the month:
CONCATENATE I_YEAR I_MONTH '01' TO I_BEDAT-LOW.
Fill a new date variable with the last day of the
month by (as above, I_BEDAT-LOW replaced by your
variable, I_MONTH incremented before by 1, subtract
1 from the readily concatenated date and you have the
last day of the month as result):
MOVE: NEW_DATE_VARIABLE TO I_BEDAT-HIGH,
      'BT'              TO I_BEDAT-OPTION, "(=Between)
      'I'               TO I_BEDAT-SIGN.   "(=Inlusive)
APPEND I_BEDAT.
After that you can continue using the I_BEDAT-Selection
in your Selection as it is.

Similar Messages

  • Appleworks freezes when attempting to change a data base field

    In a data base I created, trying to change a number in one field will freeze Appleworks. A number can be entered, but any attempt to delete, add to or change the data in that one field causes a freeze. This does not happen in any other field in this data base, nor in any other document, as far as I know. This is a fairly recent problem, and did not occur when the data base was first created.
    Is there a way to fix this without losing all the data in that field?
    Thanks!

    Hi Yvan,
    I'm sorry, but your link did not help my particular problem.
    Can I make a list of the "freezing" field and an identifying second field, delete the problem field, and then re-enter the data in a newly created field? Being efficient (read lazy) I was trying to get away from having to re-enter all the data. There are only 384 records, but the thought of redoing even one field is mind-numbing.
    Anyone else have a suggestion???
    Thanks!

  • Can CMOD change date related field description? Need user exit?

    Hi friends,
    customer use quotation and quotation date fields for other purposes thus need to change field description to make it more sense. I followed below link and changed qutotation..but same solution didn't apply to quotation date (data element IHRAN)
    Please kindly advise.
    [http://www.renet-web.net/2005/09/01/changing-standard-sap-field-descriptions]
    Thanks,
    Linda
    Edited by: Linda Gao on Aug 25, 2011 4:27 PM

    Use Quotation date in PO header as an example.
    Prerequisite: You might need a access key to access below steps.
    ME21Nu2014cursor at field quotation date (PO header) top task bar systemSatatus, Note down program name(SAPLMEGUI) ,screen number (1229) and field name (IHRAN) go to SE51, input program name and screen number choose radio button u201Celement listu201D press change go to subtab u201CText/ I/O templatesu201Dchange text part in column u201CText or I/O field u201C for component name MEPO1229-IHRAN(note IHRAN is field name you took down earlier on)save and activate the changes.

  • Master data related fields for DP, SNP and PPDS needed in Material Master

    Hi Gurus,
                  Can any one please suggest or guide me what are the fields need to be done in Material master in ECC for SAP APO DP, SNP (heuristic with capacity leveling)& PPDS(Heuritic with optimizer).
    Please it will be really great help.
    Thanks in advance
    Regards,
    Kumar

    Hi Kumar,
    For DP, many of the fields under MRP3, forecasting tab
    views will be utilised more in material master of R/3.
    For SNP, MRP 1, 2,4 and basic data views will be mostly
    useful
    For PPDS, Fields under Bom, routing, receipe, production
    versions will be used along with few fields in material
    master
    Regards
    R. Senthil Mareeswaran.

  • VA02  blocking from change -- item data

    HI,
    How to block a perticular item in the sales order from Change in the VA02...
    That is the user must not be allowed to change any data related to that item..
    Thanks and Regards,
    Santhosh

    I think you dont want user to do some changes in the data of particular item in VA02.
    U can do it using user exits.
    Have a look at below link which will give you deatails about all the user exits associated with VA02.
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
    Hope it helps you.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Changing color of a field after changing the data using OOPS ALV.

    Hi Experts,
    I have displayed three fields (price, no. of products and total amount) in my ALV grid using OOPS.
    Then am changing the data in either price or no. of products fields. When I click ENTER key the value in total amount changes correspondingly. Am able to achieve till this point.
    Now I have to change the color of the three fields( price, products and total amount) of the affected row alone and not the entire set of rows in the output grid.
    Please provide suggestions.
    Thanks in advance.

    Hi,
    You have to use Layout and Output data in your OO ALV. The below code is using FM you can replicate it in OO ALV
    types: begin of t_data,
             flg(3) type c,
             sty    type lvc_t_styl,
             col    type lvc_t_scol,
           end of t_data,
           t_tdata type table of t_data.
    constants: c_red type i value '255',
              c_g   type i value '1'.
    DATA: i_fcat type LVC_T_FCAT,
          s_fcat type lvc_s_fcat,
          s_lay  type lvc_s_layo,
          s_sty  type lvc_s_styl,
          s_col  type lvc_s_scol,
          i_data type t_tdata,
          s_data type t_data.
    s_lay-stylefname = 'STY'.
    s_lay-CTAB_FNAME = 'COL'.
    s_fcat-FIELDNAME = 'FLG'.
    APPEND s_fcat to i_fcat.
    CLEAR: s_data.
    s_data-flg = 'Yes'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
    insert s_sty into TABLE s_data-sty.
    s_col-fname = 'FLG'.
    s_col-color-col = 6.
    s_col-color-inv = 1.
    insert s_col into table s_data-col.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'No'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'No'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
    s_col-fname = 'FLG'.
    s_col-color-col = 6.
    insert s_col into table s_data-col.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'Yes'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
       IS_LAYOUT_LVC                     = s_lay
       IT_FIELDCAT_LVC                   = i_fcat
      TABLES
        T_OUTTAB                          = i_data
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    ENDIF.
    Thanks,
    Kiruba

  • How to validate data in editable ALV report after making changes

    Hi Folks,
    My requirement is to display data in ALV format with quantity field is editable. Once we get the data in display mode only quantity field is enabled right. I am going to make changes to that quantity field and updating that modifed value to the database table. Before updating databse table i want to validate the data for perticluar field which I edidted(Quantity).
    Can you guide me on this.
    Currently I am using FM: GET_GLOBALS_FROM_SLVC_FULLSCR and calling the method CHECK_CHANGED_DATA.
    I want to validate the quantity data.
    If I entered negative value like -100 instead of 100. It should validate and show some popup screen or message.
    Pls guide me on this or give some code to do that.
    Thanks&Regards,
    Surendra

    Hey Surendra,
    Check if this helps: Link:[Click here|Edit Field in Oops Alv;
    There are many posts available for this requirement. Please look SDN/web for same.
    Regards,
    Santosh

  • Can we change the data type of a field based on the value of the field

    HI Gurus,
    My Requirement is as below -- Could you please guide me
    in the Printable Adobe form -- for ex - as usual for dates fields in the Object Pallette the object type is a date/time field  and for quantity/currency fields corresponding fields are taken
    now in case the either the date, quantity or currency is initial in place of displaying 0.00 or empty date we need to display N/A (Not Applicable)
    for this I would like to change the data type of the field
    to put it simply --
    we need to change the data type of date field from DATE&TIME to Char type to hold N/A or  Quantity field to Char field to hold N/A
    how can we realize this in SAP adobe forms
    Thanks in Advace
    Ramchander Rao.K

    Hello Ramchander,
         You cannot change the data type of the field at run time in Adobe forms because the type of field you choose at the time of design level is associated with the data type itself.
    If you want to achieve your requirement, then your main idea should be to set the data type as CHARACTER itself while designing the field in the adobe form itself. CHAR field will comfortably hold the value of Calculation/amount field, Currency field, Amount, Date, Time HHMMSS, Unit Accuracy, Currency key, Floating point number, Numeric text, Client, Language and many other data types.
    After designing the field as TEXT field in Adobe form you have two options.
    Option 1:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms.
    Suppose the name of the field is TEXTFIELD1, then write the Javascript code on this field in Initialize event as below.
    if ( this.rawvalue == null )
         this.rawvalue = "N/A";
    If the field is not blank, then it will show the date. Else it will show "N/A".
    Option 2:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms. Do the formatting part in ABAP itself. It will increase the performance. Avoid Javascript as much as possible.
    Suppose you have a DATE variable l_dats of type DATS. Then take another variable l_date of type CHAR. Then write the below ABAP code.
    MOVE l_dats TO l_date.
    IF l_date IS INITIAL.
         l_date = 'N/A'.
    ENDIF.
    Bind the l_date to the TEXT field in the form.
    Even in this case, if the field is not blank, then it will show the date. Else it will show "N/A".
    But I will suggest you to use Option 2 of keeping the AMOUNT, QUANTITY, DATE, TIME fields etc as CHAR or TEXT fields in Adobe form and do the required formatting in ABAP itself.

  • How to change the data type in the table ESLL for the field USERF2_NUM ?

    Hello Friends,
    I have a requirement in which one of the change is to convert the data type of the field 'USERF2_NUM' in the table 'ESLL'  from 'QUAN' to 'CHAR'. 
    How do i do it if i have an access to change it..........i think i should also check the impact of the change if done.
    Kindly tell me as my requirement starts with this small change.
    Regards,
    Rajesh Kumar

    Thanks for the reply Sowmya.
    I would like to know 2 things.
    1. Is it ok to change the data type of the field 'USERF2_NUM '  which is in the table ESLL. from quan to char.
    2.  The table ESLL  already has entries. if we change the data type from QUAN to CHAR what is the  effect on the existing entries of the table .
    Kindly reply me back.
    Thanks & Regards,
    Rajesh Kumar

  • Change the Data Type of a Standard Required Field

    Hello Experts,
    Need to know if is it possible to change the data type of a standard field. The field is marked as a required field.
    For example: If a standard field is an Object Picker and I would like to change it to a string field. Is it possible? How can I do it?!
    Many thanks,
    Igor Nakamura

    Hi Igor,
    Since you cannot hide a required field, what you can do is move the standard required field to someplace less noticable (like the bottom of the page) and then use a validation script to set it to some benign value.
    -Howie

  • Activation error while changing the data type of a field of a table

    hi friends,
    i am facing one problem while changing a data type of a field of a table.
    i just created one table(Yqm32) .i have assigned charcter data type to one field(ztotal_count) .now i want to change this charcter data type to numeric data type.
      while changing to NUMC data type activation error is comming as below.
    Table is not yet classified                           
    Field ZTOTAL_COUNT: Type change                       
      ALTER TABLE is not possible                         
    Structure change at field level (convert table YQM32) 
    Check on table YQM32 resulted in errors   
    Table YQM32 could not be activated                       
    (E- Structure change at field level (convert table YQM32)
    plz suggest.i need to change the data type from char to numc.
    Thanks & Regards

    Hi Pabitra......
    From the SE11 change the table as u wanted and then from menubar select
    UTILITIES--> DATABASE UTILITY
    It will open database utility
    there u select the Activate and adjust database button.
    then the database table will get adjusted.
    just try it once.........
    Suresh......

  • Why does iCal automatically change the date of the entry i am making to the day before??

    why does iCal automatically change the date of the entry i am making to the day before??
    for example, when i am attempting to make a 'all-day' appointment on october 2nd 2011, it automatically shifts it to october 1st.
    but if i am doing a timed appointment for only a few hours, it will allow me to put it on that day.
    i am trying to put in travel dates so any help on how to fix this, would be greatly appreciated.

    alsdman,
    Quit iCal, and try removing the com.apple.iCal.plist file from your Macintosh HD/Users/yourusername/Library/Preferences Folder. Since that Library is now hidden, you have to use the Finder>Go Menu>Depress the "Option" key>Library. Drag the .plist file to your desktop, and log out/in or restart and check iCal for functionality.
    Also go to System Preferences...>Language & Text>Formats>Region: and set/re-set the appropriate "Region."

  • Formscentral - how do I change required date format to long date (e.g. January 2, 2014) in a form field?

    Formscentral - how do I change required date format to long date (e.g. January 2, 2014) in a form field?  I can't seem to change it from the short date format.

    Hi,
    I would suggest you to change the form language to English (UK), Here are the steps:-
    1. Open your form in FormsCentral
    2. Clik on Options tab
    3. Click on Language and Formatting and check out the selection for Form Language and make sure English (U.K.) is selected and the default date format should be day/month/year.
    Regards,
    Nakul

  • Change in Expected Delivery date (EDD) field in the PO after final release

    Hello Experts,
    There is a business requirement, whereby after PO final release is completed & when the PO is released for further processing, no further changes should be possible, except for the expected delivery date (EDD) field in the Delivery schedule tab of the PO Item details. Other than this, no changes should be possible in the PO, neither qty, nor price, not even the simple PO text should be allowed to get changed. In other words no field should be allowed to change.
    Ideally, except the EDD field, other all fields should be in grey mode, or atleast changes in any of the PO fields (except EDD) should not be allowed to get saved after the PO is final released.
    Please let me know if SAP provides any such facility, whereby you can selectively choose certain fields (like EDD field) on which Release Strategy should not be applied & changes should be allowed in these fields even after PO final release.
    Thanks in advance,
    Zafar.

    If you go to OMET transciton and here you can assign the field selection key in the field FieldSe
    and assing the User parameter EFB in user id of the user using SU3 transction
    for more help see below
    Create a Functional Authorization in the Following path:
    Material Mangement - Purchasing - Authorization Management - Define Functional Authorization for Buyers
    Now, in SU3 trxn ,Give the User Parameter EFB in the user master Parameters Tab and give the parameter value.
    create the fields selction which you want use here in PO field seleciton config.

  • Date Track fields - changes

    I have a question regarding the date tracked fields in HRMS.
    If I want to know what changes are made for a person record, How do I know that?
    The changes may be anything like position, salary, job, grade, marital status.
    How can I know the old value and the new value after the change?

    if you are modifying any assignment record an additional record will be created in the table per_all_assignments_f for the same assignment id.
    Example if the assignment is updated 3 times you can see 3 records created for the same assignment
    Thanks
    Regards
    Ramesh Kumar S

Maybe you are looking for

  • MacBook Air SMC Update v1.8 - Won't install

    Software update says to install, but it won't install even when I click the checkbox to install it (in Software Update). I install, then run S/W Update again and the darn thing is still in there saying it needs to be installed. I have tried several t

  • I can't use my back and forward cursor, how do I make them work?

    My forward and back cursors are not enabled. == This happened == Just once or twice == My firefox shut down

  • Long story short, OS got deleted and can't reinstall.

    Computer was running pretty slow for a while, last night I got the pinwheel of death for a solid ten minutes running only Chrome and Itunes. Got fed up and reinstalled mountain lion overnight, woke up to an error screen. Tried restarting, computer no

  • Web Template Print Setup

    Hi All, I am new to Web Application Designer. Is there any way that I can define print set up for my web report in my web template? Thanks Raghu

  • Site maintenance option is grayed out

    We are trying to apply our license key as the evaluation has expired but the option to perform site maintenance is grayed out. We are using the same account we used to install the product.