Recuperate value of new field with a BAdI

Hi everybody,
I am beginner in ABAP.
Currently I have create a new field in SAP CRM thanks to EEWB (Easy Enhancement Workbench). This field is visible is the screen of SAP (tcode BUP3).
I would to recuperate value of this new field at the time when user save a new value.
I have tried to recuperate value in the good table but I obtain the previous value.
I have no idea how to do this !
Do I need to use "dynpro" ?
Thank you by advance for your help !
Best regards,
Rémi

Try
  CALL FUNCTION 'BUP_MEMORY_BUT000_GET'
    EXPORTING
      iv_partner_guid = l_guid
    IMPORTING
      es_but000       = ls_but000
    EXCEPTIONS
      not_found       = 1
      parameter_error = 2
      OTHERS          = 3.
  IF sy-subrc EQ 1 .
    CALL FUNCTION 'BUP_BUT000_SELECT_WITH_GUID'
      EXPORTING
        i_partner_guid    = l_guid
      IMPORTING
        e_but000          = ls_but000
      EXCEPTIONS
        not_found         = 1
        bpext_not_entered = 2
        OTHERS            = 3.
  ENDIF .
Edited by: Arseni Gallardo on Sep 19, 2011 5:55 PM

Similar Messages

  • Populated the new field with historic data

    HI,
    I have a data for 2 years now I am enhancing the data source how can I populated the new field with historic data.Is it by
    1)deleting all the data in BW side and the doing an init then setting up a regular delta
    2)running a repair full request with selection condition.
    or is there any other option available? which is the best scenario to load these historic data?
    Regards,
    Ravi

    Hi,
    I think your datasource is already in production, and you want to data only from today onwards for enhanced fields, i.e. historical data is not required for enhanced fields..
    1.Fix ECC down time for 20 to 30 munities
    2. Keep all objects on Qty system in ECC and BW.
    3.Run Delta laods in BW for 2 to 3 times.So with this step you can clear SMQ1 and RSA7. Check the entries in RSA7, if it is ZERO then it is fine.
    4. Move DS from ECC Qty to ECC PROD .
    5. Replicate in BW.
    6. Move all BW objects from BW Qty to BW Prod.
    7. Delete Init load in InfoPackage level (Not in ODS/CUbe).
    8.Load Init without DataTransfer.
    9.Then Run Delta.
    10. Next day on wards deltas will come as usual.
    If you need Historical data also.
    1.Delete data in Cube.
    2.Fix Down Time and load Init then Delta.
    Check
    SAP Note 328181 - Changes to extraction structures inCustomizing Cockpit
    Thanks
    Reddy

  • BADI /SAPAPO/AM_ALERTLIST - How to fill values in new field catalogue

    Hi,
    I need some help for passing values into the field Catalog of an ALERT Monitor.
    The requirement is to add new fields in the ALERT Monitor and then populate them with values form the PRODUCT view.
    I have implemented method MODIFY_ALERTLIST of BADI /SAPAPO/AM_ALERTLIST. I am able to add the new columns but I am unable to add the values. Actually while debugging i found that even though the NEW values are going into the table T_ALERTS, but the space between the New Added values and the original value is HUGE. Therefore when the Field Catalog is displayed in the Alert Monitor, the NEW Values are not shown.
    I am attaching my Code
      DATA: l_table_ref TYPE REF TO data,
      l_table_ref_1 TYPE REF TO data,
      l_fieldcat_str TYPE /sapapo/am_aot_fieldcat_str,
      ls_fieldcat TYPE LINE OF lvc_t_fcat,
      ls_t_fieldcat LIKE LINE OF t_fieldcat,
      l_alert_str TYPE LINE OF /sapapo/alert_tab,
      l_str_ref TYPE REF TO data,
      l_str_ref_1 TYPE REF TO data.
      FIELD-SYMBOLS: <aot_tab> TYPE STANDARD TABLE,
      <aot_tab_1> TYPE STANDARD TABLE,
      <alert_str> TYPE /sapapo/alert_str,
      <aot_str> TYPE ANY,
      <alert_str1> TYPE c,
      <alert_str_uc> TYPE c.
      FIELD-SYMBOLS: <zat103> TYPE c. "ANY.
      DATA : l_col_pos TYPE i,
      gv_entries TYPE i,
      xlength TYPE i.
      FIELD-SYMBOLS : <info> TYPE ANY,
                      <aot_str1> TYPE ANY.
      DATA olen1 TYPE i.
      DATA: t_pegid TYPE STANDARD TABLE OF /sapapo/amopegid_tab,
            t_ordid TYPE STANDARD TABLE OF /sapapo/amoordid_tab.
      CLEAR: l_alert_str,
        l_table_ref ,
        l_table_ref_1 ,
        l_fieldcat_str ,
        ls_fieldcat ,
        ls_t_fieldcat ,
        l_str_ref  .
    *Add new column
      READ TABLE t_fieldcat INTO ls_t_fieldcat INDEX 1.
      DATA: x1 TYPE lvc_t_fcat,
           y1 LIKE LINE OF x1.
      x1 = ls_t_fieldcat-fieldcat.
      LOOP AT x1 INTO y1 WHERE reptext NE space.
        CHECK y1-fieldname NE 'DELIVERY_DATE'.
        xlength = xlength + y1-intlen.
      ENDLOOP.
      DESCRIBE TABLE  x1 LINES gv_entries.
    Appending Delivery Date
      ls_fieldcat-col_pos = gv_entries + 1.
      ls_fieldcat-fieldname = 'DELIVERY_DATE'.
      ls_fieldcat-ifieldname = 'DELIVERY_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Delivery Date'.
      ls_fieldcat-outputlen = '10'.
    ls_fieldcat-rollname = '/SAPAPO/DELIVERY_DATE' . "'DATS'.
      ls_fieldcat-domname = '/SAPAPO/CHAR20'."'/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Delivery Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Start Date
      ls_fieldcat-col_pos = gv_entries + 2.
      ls_fieldcat-fieldname = 'STARTDAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Start Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Start Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Required Shelf Life Date
      ls_fieldcat-col_pos = gv_entries + 3.
      ls_fieldcat-fieldname = 'SL_MIN_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req.SL dte'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req.SL dte'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Shelf Life Date/Required Maximum Shelf life Date
      ls_fieldcat-col_pos = gv_entries + 4.
      ls_fieldcat-fieldname = 'SL_MAX_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'SL Date 2'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'SL Date 2'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending (Availability/Requirements) Date of a Schedule Line
      ls_fieldcat-col_pos = gv_entries + 5.
      ls_fieldcat-fieldname = 'AVL_REQ_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Schedule Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Schedule Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Req Date/ Shipment end date
      ls_fieldcat-col_pos = gv_entries + 6.
      ls_fieldcat-fieldname = 'SHIP_MAX_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req Date/ Shipment end date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req Date/ Shipment end date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Expected Grading Date
      ls_fieldcat-col_pos = gv_entries + 7.
      ls_fieldcat-fieldname = 'GRAD_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Expected Grading Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Expected Grading Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Available Date
      ls_fieldcat-col_pos = gv_entries + 8.
      ls_fieldcat-fieldname = 'AVAIL_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Available Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Available Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
      MODIFY TABLE t_fieldcat FROM ls_t_fieldcat.
      DATA lvc_t_fcat TYPE lvc_t_fcat.
    *CODE FOR ADDING THE NEW VALUES*
    ASSIGN Alert Structure to Field Symbols for Unicode
      ASSIGN COMPONENT 0 OF STRUCTURE l_alert_str
                         TO            <alert_str>           CASTING.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ls_t_fieldcat-fieldcat
        IMPORTING
          ep_table        = l_table_ref.
    *assign dynamic structure
      ASSIGN l_table_ref->* TO <aot_tab>.
      CREATE DATA l_str_ref LIKE LINE OF <aot_tab>.
      ASSIGN l_str_ref->* TO <aot_str>.
      ASSIGN l_str_ref->* TO <alert_str_uc> CASTING.
      LOOP AT t_alerts INTO l_alert_str.
       READ TABLE t_fieldcat WITH KEY aot = l_alert_str-aot
       INTO l_fieldcat_str.
       CALL FUNCTION '/SAPAPO/ATAB_FIELDCAT_GET'
         EXPORTING
           aot        = l_fieldcat_str-aot
           mview      = l_fieldcat_str-mview
         IMPORTING
           table_ref  = l_table_ref
           t_fieldcat = lvc_t_fcat.
        ASSIGN l_alert_str TO <alert_str>.
    *copy alert to aot-specific structure
        MOVE <alert_str>-info TO <alert_str_uc>.
    *Write this code inside the loop
        ASSIGN COMPONENT 'DELIVERY_DATE' OF STRUCTURE <aot_str> TO <zat103>.  "CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'STARTDAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MIN_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MAX_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVL_REQ_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SHIP_MAX_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'GRAD_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVAIL_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        MOVE <alert_str_uc> TO <alert_str>-info.
        MODIFY t_alerts FROM l_alert_str INDEX sy-tabix.
        CLEAR : <alert_str>, <alert_str_uc>.
      ENDLOOP.
    I have even tried Concatenating Values,  with that method even though the NEW Values are available but they do not fall under the correct Column.
    PLEASE help me out cos I am really Stuck.
    Regards
    Abhishek Sahi

    Hi,
    I need some help for passing values into the field Catalog of an ALERT Monitor.
    The requirement is to add new fields in the ALERT Monitor and then populate them with values form the PRODUCT view.
    I have implemented method MODIFY_ALERTLIST of BADI /SAPAPO/AM_ALERTLIST. I am able to add the new columns but I am unable to add the values. Actually while debugging i found that even though the NEW values are going into the table T_ALERTS, but the space between the New Added values and the original value is HUGE. Therefore when the Field Catalog is displayed in the Alert Monitor, the NEW Values are not shown.
    I am attaching my Code
      DATA: l_table_ref TYPE REF TO data,
      l_table_ref_1 TYPE REF TO data,
      l_fieldcat_str TYPE /sapapo/am_aot_fieldcat_str,
      ls_fieldcat TYPE LINE OF lvc_t_fcat,
      ls_t_fieldcat LIKE LINE OF t_fieldcat,
      l_alert_str TYPE LINE OF /sapapo/alert_tab,
      l_str_ref TYPE REF TO data,
      l_str_ref_1 TYPE REF TO data.
      FIELD-SYMBOLS: <aot_tab> TYPE STANDARD TABLE,
      <aot_tab_1> TYPE STANDARD TABLE,
      <alert_str> TYPE /sapapo/alert_str,
      <aot_str> TYPE ANY,
      <alert_str1> TYPE c,
      <alert_str_uc> TYPE c.
      FIELD-SYMBOLS: <zat103> TYPE c. "ANY.
      DATA : l_col_pos TYPE i,
      gv_entries TYPE i,
      xlength TYPE i.
      FIELD-SYMBOLS : <info> TYPE ANY,
                      <aot_str1> TYPE ANY.
      DATA olen1 TYPE i.
      DATA: t_pegid TYPE STANDARD TABLE OF /sapapo/amopegid_tab,
            t_ordid TYPE STANDARD TABLE OF /sapapo/amoordid_tab.
      CLEAR: l_alert_str,
        l_table_ref ,
        l_table_ref_1 ,
        l_fieldcat_str ,
        ls_fieldcat ,
        ls_t_fieldcat ,
        l_str_ref  .
    *Add new column
      READ TABLE t_fieldcat INTO ls_t_fieldcat INDEX 1.
      DATA: x1 TYPE lvc_t_fcat,
           y1 LIKE LINE OF x1.
      x1 = ls_t_fieldcat-fieldcat.
      LOOP AT x1 INTO y1 WHERE reptext NE space.
        CHECK y1-fieldname NE 'DELIVERY_DATE'.
        xlength = xlength + y1-intlen.
      ENDLOOP.
      DESCRIBE TABLE  x1 LINES gv_entries.
    Appending Delivery Date
      ls_fieldcat-col_pos = gv_entries + 1.
      ls_fieldcat-fieldname = 'DELIVERY_DATE'.
      ls_fieldcat-ifieldname = 'DELIVERY_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Delivery Date'.
      ls_fieldcat-outputlen = '10'.
    ls_fieldcat-rollname = '/SAPAPO/DELIVERY_DATE' . "'DATS'.
      ls_fieldcat-domname = '/SAPAPO/CHAR20'."'/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Delivery Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Start Date
      ls_fieldcat-col_pos = gv_entries + 2.
      ls_fieldcat-fieldname = 'STARTDAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Start Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Start Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Required Shelf Life Date
      ls_fieldcat-col_pos = gv_entries + 3.
      ls_fieldcat-fieldname = 'SL_MIN_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req.SL dte'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req.SL dte'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Shelf Life Date/Required Maximum Shelf life Date
      ls_fieldcat-col_pos = gv_entries + 4.
      ls_fieldcat-fieldname = 'SL_MAX_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'SL Date 2'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'SL Date 2'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending (Availability/Requirements) Date of a Schedule Line
      ls_fieldcat-col_pos = gv_entries + 5.
      ls_fieldcat-fieldname = 'AVL_REQ_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Schedule Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Schedule Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Req Date/ Shipment end date
      ls_fieldcat-col_pos = gv_entries + 6.
      ls_fieldcat-fieldname = 'SHIP_MAX_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req Date/ Shipment end date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req Date/ Shipment end date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Expected Grading Date
      ls_fieldcat-col_pos = gv_entries + 7.
      ls_fieldcat-fieldname = 'GRAD_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Expected Grading Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Expected Grading Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Available Date
      ls_fieldcat-col_pos = gv_entries + 8.
      ls_fieldcat-fieldname = 'AVAIL_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Available Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Available Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
      MODIFY TABLE t_fieldcat FROM ls_t_fieldcat.
      DATA lvc_t_fcat TYPE lvc_t_fcat.
    *CODE FOR ADDING THE NEW VALUES*
    ASSIGN Alert Structure to Field Symbols for Unicode
      ASSIGN COMPONENT 0 OF STRUCTURE l_alert_str
                         TO            <alert_str>           CASTING.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ls_t_fieldcat-fieldcat
        IMPORTING
          ep_table        = l_table_ref.
    *assign dynamic structure
      ASSIGN l_table_ref->* TO <aot_tab>.
      CREATE DATA l_str_ref LIKE LINE OF <aot_tab>.
      ASSIGN l_str_ref->* TO <aot_str>.
      ASSIGN l_str_ref->* TO <alert_str_uc> CASTING.
      LOOP AT t_alerts INTO l_alert_str.
       READ TABLE t_fieldcat WITH KEY aot = l_alert_str-aot
       INTO l_fieldcat_str.
       CALL FUNCTION '/SAPAPO/ATAB_FIELDCAT_GET'
         EXPORTING
           aot        = l_fieldcat_str-aot
           mview      = l_fieldcat_str-mview
         IMPORTING
           table_ref  = l_table_ref
           t_fieldcat = lvc_t_fcat.
        ASSIGN l_alert_str TO <alert_str>.
    *copy alert to aot-specific structure
        MOVE <alert_str>-info TO <alert_str_uc>.
    *Write this code inside the loop
        ASSIGN COMPONENT 'DELIVERY_DATE' OF STRUCTURE <aot_str> TO <zat103>.  "CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'STARTDAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MIN_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MAX_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVL_REQ_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SHIP_MAX_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'GRAD_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVAIL_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        MOVE <alert_str_uc> TO <alert_str>-info.
        MODIFY t_alerts FROM l_alert_str INDEX sy-tabix.
        CLEAR : <alert_str>, <alert_str_uc>.
      ENDLOOP.
    I have even tried Concatenating Values,  with that method even though the NEW Values are available but they do not fall under the correct Column.
    PLEASE help me out cos I am really Stuck.
    Regards
    Abhishek Sahi

  • Adding new field with constant value for pre-existing records

    Hi,
    I have to introduce in different tables (ztable and standard one) a new field, containing the company code. The problem is that all the records already inserted in these tables should be filled with a particular company code ('DD01').
    I'd like to have this field automatically filled with a constant value without having to develop a program in order to update all the preexisting data. The reason is that cardinality of these tables is aroud 100 Millions of rec....
    Ideal solution should be to have some rule/routine defined in the data dictionary CR, so to get the field value during the import of the related CR.
    I've seen that is possible to define routine, but only for maintainance view (so new records..). If I open the db view, the situation is the following (example):
    Campi di ZKR_CRPU  
    Nm.campo Pos. Tp. dati Lngh. Decimali Not null Default
    MANDT 1 VARCHAR 3   X '000'
    ZZKDATANNO 2 VARCHAR 4   X '0000'
    ZZKDATMESE 3 VARCHAR 2   X '00'
    ZZKCODZONA 4 VARCHAR 3   X ' '
    ZZKDCODCTDIS 5 VARCHAR 6   X ' '
    ZZKCRPU 6 DECIMAL 10 9 X 0
    Is it possible to change the default value? is there a solution to my problem without developing a tool just for updating a field? I can also define a custom data element if the problem can be solved.
    Thanks a lot,
    Gabriele

    Hi!
    If I were you, I will not look for another solution, because it's pretty easy task for ABAP.
    It can be solved within 1 line:
    UPDATE ztable SET zzcompany = 'DD01' WHERE zzcompany = ''.
    Regards
    Tamá

  • Dynamci Query Result View - New Field with domain values

    Hi,
    I added to the result list a new field (using an append structure). Than I added it to the layout. This field contains a number, which will be translated into text by domain values. But in my result view only the number will be displayed. Any idea how I can display the text instead of the ID?
    Thanks in advance Paul.

    Hi Paul,
    You can display the domain text by fetching it in the corresponding GETTER method. The GETTER will be sending the ID; you can add extra code to fetch the corresponding text ID in the getter and return this in rv_value.
    Regards,
    Shiromani

  • Put a default value in an infotype with a BADI ?

    We want to put a default value in the administrators fields of the infotype 0001 (depending on the company code) when the user create/change it.
    A standard feature exist but onluy for the administrator group.
    Because we want to follow the technological evolution of SAP, we try to use a badi instead of a user-exit.
    So, we found this badi definition: HRPAD00INFTY (method BEFORE_OUTPUT).
    Problem: all the parameters (including the infotype value) are IMPORT parameters.
    So we can't modify the infotype content...
    Do anyone know how to modify the content of an infotype with a BADI ?
    Or do we must continue to use user-exit in such cases ?

    If one was just learning about userexits, BAdIs and the new Enhancement Framework as well as infotype PBO and PAI, this can be a bit of a mountain to climb, but these two documents might be useful.
    <a href="/people/sergey.korolev/blog/2005/03/14/the-time-for-me-to-have-a-badi-of-my-own time for me to have a BADi of my own</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/266">what the New Enhancement Framework Is For – Its Basic Structure and Elements For Beginners (Five Parts)</a>
    I "enhanced" the first article's solution with the second article's tutorial to cut my teeth on the new framework while providing myself with a means to use BAdIs for infotype PBOs/PAIs.  Thank you very much to the authors!

  • How to replace blank values in DATE field with 00000000

    Hi
    I have a DSO with Date field in which there are blank values. I want to replace the blank values in the DSO for date field with 00000000. Because of this blank values in the DSO the report is giving an ORA error.
    How do we replace the blank values in the DSO for historical data and also the new loads?
    Please advise.
    Thank you.
    Regards,
    Pavan.

    Hi Suman,
    I'm trying to run a query built on a DSO. The DSO has a field 'Start Date'. This Start Date InfoObject has a reference Char as 0DATE.
    This Start Field has blank values due to which I'm getting the ORA-01722 error. I came across many threads with same topic of discussion. As mentioned in one of the Threads I have written a program to update 'Start Date' with 00000000. The code wriiten is "UPDATE /BIC/AZ_MONINV00 SET /BIC/ZSTR_DTE = '00000000' where /BIC/ZSTR_DTE = ' '.
    Now when I see the data in the active data table of DSO the blank value is replaced with '00000000'.
    But If I right click on the DSO click on display data the 'Start Date' field is blank. And now the Query also gets executed without any error. But in the output of the query the 'Start Date' Field has "#" values.
    Can anyone suggest on how to remove these "#" values in the report?

  • Update new field with existing data programmatically

    I have a requirement to write a code that update an existing lookup field.
    We are running sharepoint 2010. We have a content type, which is used throughout all the sites. The content type has a field called Product, which is a lookup field for all the products we have. The field also contains subproducts. For example, a product
    by name PR1000 has a subproduct PR1010 all in the same drop down menu.
    Now we want to change this grouping and separate them based on product and subproduct. I have created new field called Parent Product (PP) and Child Product(CP).
    I would like to programmatically update the Parent Product field with Product and Child PRoduct field with child product if any. So here is how it works; if an existing item or document has product PR1010, I would to update PP with PR1000 and CP with 1010.
    The problem I am having in order to start this project is the product field is part of every document library and lists and there are 1000s of items with data for product.
    Please help with ideas or suggestions. I am thinking of a feature event receiver, which when activated will automatically update every item with product field not empty.
    Thanks for your help in advance.

    As Bruno suggested ,if its on time activity and on the all site then so go with Powershell 
    script. use feature event receiver when it require on the selected site and if this require to extend
    other sites so that contol will be at your end,else you need to again modified the powershell script.
    Regards,
    Rajendra Singh
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
    http://sharepointundefind.wordpress.com/

  • Popup Errors caused by new fields with retrieval rules.

    I need to suppress the popup errors caused by retrieval rules that  reference fields that were added to a dictionary after a service request  was submitted.
    I added several fields to a dictionary, and the fields will always   remain hidden.  In the form (that is used by multiple services) I   created several retrieval rules to insert data into these new fields.    This now causes popup errors, "An attempt to get data and/or use it on   the form has failed because the field
    <Dictionary>.<Field>
    is not on this form" on  service requests that have this form and were  submitted prior to the  addition of the dictionary fields.  If possible,  we would rather not  use a Javascript to supress this as we like to  configure the product  correctly rather than patch it.  The fields are  filled in by retrieval  rules (on field change) on the  Customer_Information newScale reserve  form, so just creating another  form isn't an option. If I do have to  use a Javascript, and someone can  send me what they use, I would really  appreciate it.  Thanks.

    Hi Joe,
    I found the function to exist in two files by searching for the error message you were receiving:
    RequestCenter.war\refactor\common\js\isfReduction.js and
    RequestCenter.war\refactor\common\js\common_sm_task_and_req.js
    You should be able to stop that function being called easy enough.
    Cheers,
    Ant

  • Add new field with Report ME80FN

    I would like to Add Invoice number and order acknowlegment field with standreport ME80FN. How can I add these field with that report.pls any1 sugesst me ?
    Thanks in advance

    This report is a query on logical database MEPOLDB, why don't you build your own query ?
    Regards,
    Raymond

  • How can I display only one value of a field with two or more values?

    Post Author: skiabox
    CA Forum: Crystal Reports
    I have a field in my report with 2 or more values (depending of another field id).For example for id = 1 the report gives me 2 names in that field.For id = 3 the report gives me 3 names in that field.I want to display only one of these names in the id row.The selection of name is random.Thanks!

    Hello Tim,  would barely fit in this situation since this code resides on the client’s interaction side of things. I’d recommend using JavaScript for this matter, e.g. var Data_FName1 = document.getElementById(‘Data_FName1’).value;. If you still opt for using CFML, then you’d go for proxying your JavaScript code to a CFC.

  • How to copy  existing  row  value into new row  with a trigger. Same table

    Oracle guru,
    I am looking for a before or after trigger statement that will copy existing values inserted in the previous row into columns A & B. Then insert those values in a new row into column A & B if null? Same table. Hopefully my question is clear enough.
    -Oracle 10g express
    -I have an existing " before insert trigger" that insert id and timestamps when a new row is created.
    -Table is composed of column like id,timestamps,A,B and more.
    Thanks in advance
    Pierre

    957911 wrote:
    Oracle guru,
    I am looking for a before or after trigger statement that will copy existing values inserted in the previous row into columns A & B. Then insert those values in a new row into column A & B if null? Same table. Hopefully my question is clear enough.
    -Oracle 10g express
    -I have an existing " before insert trigger" that insert id and timestamps when a new row is created.
    -Table is composed of column like id,timestamps,A,B and more.
    Thanks in advance
    PierreI will call it a very Wrong design.
    It is a wrong Table Design. You are duplicating the data in table and not complying with the Database Normalization rules.
    How about Verifying if Column A & B are NULL before inserting and inserting another row and avoiding it in Triggers?
    If you are bent to achieve this, below code might be helpful. However, I would never go with this approach. If you would care about explaining the reason for going ahead with such a data model, people could suggest better alternative that might conform with Normalization rules.
    create or replace trigger trg_test_table
    after insert on test_table
    for each row
    declare
      pragma autonomous_transaction;
    begin
      if :new.col_a is null and :new.col_b is null then
        insert into test_table
        select 2, systimestamp, col_a, col_b
          from test_table
         where pk_col = (select max(pk_col) from test_table b where b.pk_col < :new.pk_col);
      end if;
      commit;
    end trg_test_table;Read SQL and PL/SQL FAQ and post the mentioned details.
    Do not forget to mention output from
    select * from v$version;

  • SQL to match a single value in a field with comma-delimited text

    I have a column that can contain none, one or many recordIDs
    (from another table) stored as comma-delimited text strings (i.e.,
    a list). I need to retrieve all records that match a single value
    within that list.
    For example, if I want to match all values that equal
    recordID 3, and I use ... WHERE MyColumn IN ('3') ... , I will get
    all records that have EXACTLY 3 as the value of MyColumn, but not
    any MyColumn records whose values include 3, if they are instances
    such as "3,17" or the like.
    Also using the LIKE operator -- as WHERE MyColumn LIKE '%3%'
    -- will get me unwanted records with values such as 35 or 13 ...
    Can I use some sort of intervening ColdFusion list processing
    to output only the desired records?

    Normalize your database so that your data becomes
    accessible.

  • Value of new field in SAP internal table does not appear in HTML

    There is already an existing web application. (has both SAP and HTML programs)
    I only need to add one field in the SAP internal table and display the value in HTML.
    I activated and pushed the publish button in SAP.
    Still, it is not read successfully in HTML and therefore not displayed in the GUI.
    What step did I miss?

    Hi,
    To publish completely an internet service, try SIAC_PUBLISH_ALL_INTERNAL transaction.
    Hope this helps,
    Iván.

  • Add new fields with EEW and assign a standard check table?

    Hi,
    I would like to add more language fields to a BP - Sold-to (Organization). As I see, one possibility is to use EEW.
    Is it then possible to link this field to an existing check table in order to get the existing langauge codes by default?
    Thanks in advance!
    //a

    Hi,
    Actually i am working on the similar task. I added 2 custom fields in order item level using EEWB. I added the check table to my custom field but for some reason it wouldn't show up. So i added the values to the DOMAIN assigned to the custom field and the values showed up on the screen in the seatch help.
    I am actually still trying to find other possibilities. I will let you know if i find any.
    Hope this helps you,
    Karuna.

Maybe you are looking for