To populate value in the 2 field given the first field valu

hi,
I got an answer from sdn i tried with my prg its not working can u tell me what mistake i have done.
data: begin of iitab occurs 0.
      include structure dynpread.
data: end of iitab.
data: begin of rtab occurs 0.
    include structure DDSHRETVAL.
data: end of rtab.
data: begin of t_maktx.
      include structure T001.
data: end of t_maktx.
data: T_BUKRS like T001-BUKRS.
PARAMETERS : bukrs LIKE t001-bukrs. "MATCHCODE OBJECT C_T001.
PARAMETERS : butxt LIKE t001-butxt.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR bukrs.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
  EXPORTING
    TABNAME                   = 'T001'
    FIELDNAME                 =  'BUKRS'
TABLES
   RETURN_TAB                = RTAB
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear iitab.
refresh iitab.
iitab-fieldname = 'BUKRS'.
append iitab.
iitab-fieldname = 'BUKTXT'.
append iitab.
read table rtab. "with key fieldname = 'MATNR'.
T_BUKRS = rtab-fieldval.
SELECT SINGLE * FROM t001 INTO t_maktx where bukrs = T_BUKRS .
read table iitab with key fieldname = 'BUKRS'.
iitab-fieldvalue = T_BUKRS.
modify iitab transporting fieldvalue where fieldname = 'BUKRS'.
read table iitab with key fieldname = 'BUKTXT'.
iitab-fieldvalue = t_maktx-BUTXT.
modify iitab transporting fieldvalue where fieldname = 'BUKTXT'.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
  EXPORTING
    DYNAME                     = sy-cprog
    DYNUMB                     = sy-dynnr
  TABLES
    DYNPFIELDS                 = iitab
EXCEPTIONS
  INVALID_ABAPWORKAREA       = 1
  INVALID_DYNPROFIELD        = 2
  INVALID_DYNPRONAME         = 3
  INVALID_DYNPRONUMMER       = 4
  INVALID_REQUEST            = 5
  NO_FIELDDESCRIPTION        = 6
  UNDEFIND_ERROR             = 7
  OTHERS                     = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Hi,
Chk this code:
Its working fine:
DATA: BEGIN OF iitab OCCURS 0.
        INCLUDE STRUCTURE dynpread.
DATA: END OF iitab.
DATA: BEGIN OF rtab OCCURS 0.
        INCLUDE STRUCTURE ddshretval.
DATA: END OF rtab.
DATA: BEGIN OF t_maktx.
        INCLUDE STRUCTURE t001.
DATA: END OF t_maktx.
DATA: t_bukrs LIKE t001-bukrs.
PARAMETERS : bukrs LIKE t001-bukrs. "MATCHCODE OBJECT C_T001.
PARAMETERS : butxt LIKE t001-butxt.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR bukrs.
  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
      tabname    = 'T001'
      fieldname  = 'BUKRS'
    TABLES
      return_tab = rtab.
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CLEAR iitab.
  REFRESH iitab.
  iitab-fieldname = 'BUKRS'.
  APPEND iitab.
  iitab-fieldname = 'BUTXT'.
  APPEND iitab.
  READ TABLE rtab. "with key fieldname = 'MATNR'.
  t_bukrs = rtab-fieldval.
  SELECT SINGLE * FROM t001 INTO t_maktx WHERE bukrs = t_bukrs .
  READ TABLE iitab WITH KEY fieldname = 'BUKRS'.
  iitab-fieldvalue = t_bukrs.
  MODIFY iitab TRANSPORTING fieldvalue WHERE fieldname = 'BUKRS'.
  READ TABLE iitab WITH KEY fieldname = 'BUTXT'.
  iitab-fieldvalue = t_maktx-butxt.
  MODIFY iitab TRANSPORTING fieldvalue WHERE fieldname = 'BUTXT'.
  CALL FUNCTION 'DYNP_VALUES_UPDATE'
  EXPORTING
  dyname = sy-cprog
  dynumb = sy-dynnr
  TABLES
  dynpfields = iitab
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
UNDEFIND_ERROR = 7
OTHERS = 8
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
start-of-selection.

Similar Messages

  • Auto populate other fields bases on the first 2 fields

    Hello,
    I have a form that has 5 fields in which the first 3 fields are pre-populated from the 1st web service based on their user id and now I'd like to have the other 2 fields to pre-populate bases on that first 3 fields that execute from a 2nd web service but having issues on that. If I have it manually enter the input than it work but I could not make it work by auto pre-populate bases on the first fields that already pre-poulated. Can you please advise on this..
    Thanks in advance,
    Han Dao

    Hi Paul,
    I use Form:ready to trigger the 2nd WS as the same one for the 1st one. I use AWS_ASSIGNED_ID (hidden field) to control both of the WS. I am not sure that I understand you correctly about the two sets of input output execute bindings for those fields.  Can you please explain a little bit more.
    Thanks, Han

  • How to populate values for a new field in target infoprovider

    Hi Experts,
    am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case,  i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
    Thank you,
    Chitra.
    Edited by: Chitra_BI on Jun 13, 2011 10:23 AM

    Debug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
    Regards,
    Lalit Mohan Gupta.

  • How to Populate Values in Report for Fields

    Hi Experts,
    I have a Report requirement where in I need to Populate values for FROM Period & TO Period based on the user i/p for Quarter variable.
    For Eg;
    Fiscal year : 2009
    Quarter : 3
    Mat     Year         From period    ToPeriod          QTY
      A      2009            07                  09                1
      B      2009            07                  09                22
      C      2009            07                  09                44
    There are no fields FROM Period or TO Period in Cube.I need to populate them in the report directly.
    Please give some inputs to goahead.
    Thanks
    Ravve
    Edited by: ravve king on Jun 4, 2009 4:38 PM
    Edited by: ravve king on Jun 4, 2009 4:39 PM

    You're going to need to create a User Exit in your query. Here's a link to a helpful document on how to do that:
    [Using Customer Exit Variables in BW/BI Reports Part - 1|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90]

  • Auto populate values in the the database table

    Hi All,
    I have a requirement where user enter values in one of the ZTransaction. This will update a Ztable. So the new requirement is to add two new columns in the fields, which is completed. Now this two new fields are supposed to auto populate values based upon the key field .
    The transaction code is defined with Transaction as SM30 and Default values as
    Name of the screen field     value
    Update                               X
    VIEWNAME                      "table name which the values are updated".
    Please let me know how to do this.
    Thank you!!

    Hi Swetha,
    I am unsure of what you are trying to accomplish so I will make a few assumption and perhaps you can find some benefit in it.
    I suppose you are trying to add new fields to a custom (Z) database table.
    If so then use SE11 to add the two new columns.
    After this is complete then rebuild the table maintenance by using the following path: SE11-> Utilities->Table Maintenance Generator.  (Remember to double check the Recording Routine Radio button.)
    If the user needs fields automatically populated then check the following link.  It describes how to use table maintenance events.  I suppose you need to use Event 01 and Event 05.
    http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    Good luck and reward points if helpful,
    AK
    Moderator message -  Asking for points is against the Forum's RoE
    Message was edited by: Suhas Saha

  • To populate values into single field in an internal table

    Hi Friends,
    How we need to populate values into single field in an internal table.
    E.g itab consits of single field ( name)
           i need to assign values to this field name .like
          peter,
          john,
          abrahm,
          daneyal
    Pls tell me i how i need to code for this
    Thanks ,
    Parnith

    Hi,
    Please look at the below code :
    DATA : BEGIN OF itab OCCURS 0 ,
             name(20) TYPE c,
           END OF itab.
    START-OF-SELECTION.
      itab-name = 'Peter'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'John'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Abrahm'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Daneyal'.
      APPEND itab.
      CLEAR itab.
      LOOP AT itab.
        WRITE : / itab.
      ENDLOOP.
    Thanks,
    Sriram Ponna.

  • How to populate Second drop down based on the first drop down value

    Hi Experts,
    i have a HTML BSP page. with 2 drop down with SELECT and OPTION tags. i need to populate the second drop down based on the first drop down value.
    i tried HTMLB script they work good as stand alone when i try to embed the HTMLB with HTML it does not work.
    Please can you give me a solution only with ABAP script and HTML.
    please clearly let me know on what event i should implement it. sample code is really appreciated .
    With regards,
    Chella

    You can have event handler for first drop down . Then populate the data for 2nd field when the event triggers on first field.

  • How to extend the IDoc ORDERS05 and populate values?

    Hi,
    My requirement is to add few fields to the standard IDoc ORDERS05 and populate values to the newly added fields.
    Please let me know how to extend the standard IDoc ORDERS05.
    Regards,
    Balaji. R

    Hi balaji,
    you can try to google for SAP R/3 IDoc Cookbook for EDI and Interfaces by Axel Angeli et.al.
    Although Axel refers primarily to MATMAS Idoc the technique of extending IDOCs is explained very well.
    Also very good is the search function here on SCN, I just found
    [Some Experience on IDoc Enhancement|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414900%29ID0711317150DB10743789739220747754End?blog=/pub/wlg/8285]
    Blogs and Wikis here are the best source for general questions like yours, usually of much more value than forum answers
    Regards,
    Clemens

  • How to populate values in listbox of a field?

    HI all,
    My requirement is : i have one filed , for that i have five values,
    i want to display those five values in the list box. then i have to select one of them  and based on this field i have to display few fields in table control .
    here i am able to display the values in listbox but even i select any value , it showing the first vale only !!!!!!
    please help me in this regard.

    This is the way........
    DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
      DATA : L_PSPNR  TYPE PROJ-PSPID,
             L_WBSE   TYPE PRPS-POSID.
    PARAMETERS : P_BPO TYPE CKIS-EXTNR
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BPO.
    DATA : BEGIN OF IT_BPO OCCURS 100,
             BPO LIKE ZCKIS-BPO,
             END OF IT_BPO.
      DYNFIELDS-FIELDNAME = 'P_PSPNR'.
      APPEND DYNFIELDS.
      CLEAR DYNFIELDS.
      DYNFIELDS-FIELDNAME = 'P_WBSE'.
      APPEND DYNFIELDS.
      CLEAR DYNFIELDS.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME               = SY-CPROG
          DYNUMB               = SY-DYNNR
          TRANSLATE_TO_UPPER   = 'X'
        TABLES
          DYNPFIELDS           = DYNFIELDS
        EXCEPTIONS
          INVALID_ABAPWORKAREA = 1
          INVALID_DYNPROFIELD  = 2
          INVALID_DYNPRONAME   = 3
          INVALID_DYNPRONUMMER = 4
          INVALID_REQUEST      = 5
          NO_FIELDDESCRIPTION  = 6
          INVALID_PARAMETER    = 7
          UNDEFIND_ERROR       = 8
          DOUBLE_CONVERSION    = 9
          STEPL_NOT_FOUND      = 10
          OTHERS               = 11.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
    Rewards if satisfied
    Thanks

  • Custom Field in BSID - How do I populate value at time of JE?

    Hi all
    We have a custom append to the BSID table to have a custom field. I was hoping we could populate this custom field on BSID using the FI substitution rule in OBBH. However, it looks like we cannot access BSID from within the FI substitution exit.
    Can anyone suggest how I could populate data into a custom field on BSID at the time of a AR Journal entry?
    Thanks
    V

    I posted the following reply to a similar question before, which I am copying below.
    Try the following: I have taken HKONT (GL Account) as an example to add to the substitution table.
    SE16
    Table GB01
    field HKONT
    execute
    /h
    select the line and hit display
    bearkpoint -> breakpoint at -> subroutine
    enter subroutine -> SET_STATUS_VAL
    F8
    double click on the word "code"
    remove SHOW and type EDIT and click on pencil
    F8
    remove the exclude flag and save.
    do again and save.
    debugging off and save again.

  • Populate values in f4 dialog screen based on the values in selction screen

    hi,
    i have done a module program where i would enter the details like ssales org ,division,distribution channel in the selection screen and would enter the screen having the table control... in that table control i have a field for customer code.. when i press f4 for cus code.,dialog box appears for the cus code and in that , sales group tab should be selected and the divsion ,dist channel and sales organisation i gave in the slection screen should be displayed as default...how can i do this ..
    since there is no screen no as such i am finding it difficult to crack.
    with thanks in advance ,
    syed

    if you do not give a specific number to selection-screen, its dynpro number is 1000.
    So in POV (AT SELECTION-SCREEN ON VALUE-REQUEST) use the classical DYNP_VALUES_READ with dynumb  = '1000' to get current values from screen, then you can
    - Fill yourself an internal table and call F4IF_INT_TABLE_VALUE_REQUEST
    - Call F4IF_FIELD_VALUE_REQUEST using CALLBACK_PROGRAM and CALLBACK_FORM to call a form in your report that will be executed by the search-help and there (look at online documentation) will change the default values of subfiled (itab) SELOPT of  SHLP parameter (type SHLP_DESCR_T)
    Sample of the second case (there are already too many samples for the first on sdn)
    .* POV
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_umskz.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                tabname          = 'BSID'
                fieldname        = 'UMSKZ'
                callback_program = g_repid " copy of sy-repid
                callback_form    = 'CGS_DEBITOR'
           TABLES
                return_tab       = return_tab
           EXCEPTIONS
                OTHERS           = 1.
    * Form for callback
    FORM cgs_debitor TABLES   record_tab STRUCTURE seahlpres
                     CHANGING shlp TYPE shlp_descr_t
                              callcontrol LIKE ddshf4ctrl.
    * Local data
      DATA: ddshiface TYPE ddshiface,
            worklist LIKE lumskz,
            dynpfields TYPE TABLE OF dynpread WITH HEADER LINE.
    * Only D-ebitor
      LOOP AT shlp-interface INTO ddshiface WHERE shlpfield = 'KOART'.
        ddshiface-valtabname = 'BSID'.
        ddshiface-valfield   = 'KOART'.
        ddshiface-value      = 'D'.
        MODIFY shlp-interface FROM ddshiface.
      ENDLOOP.
    ENDFORM.
    .Regards,
    Raymond

  • Populating parts of form based on Value entered in the first field

    Hello,
    I am trying to create a form, where user will enter the serial number of his equipment and I want him to click a verify button next to it.Upon clicking the verify button I want the Item Description field of the form to be updated ( this info is pulled from a backend MySql DB).Also, the text fields corresponding to the Equipment Site to be populated.After checking all the info, user should be able to click a submit button at the end of form and this information should be written to another table.I attached a Insert record server behaviour to form.Essentially, I want to attach a different action to both buttons on the form.In my view this is same a when we fill those registration form and based on our country, our state drop down gets populated.It seems this is doable, but I am not able to figure out how.I would really appreciate any help
    Thanks

    This is very simple if you understand PHP code. Basically, you give the two buttons different names, and use PHP conditional logic to control what happens. Call one button "verify" and the other "insert". If you use the POST method, you control the script like this:
    if (array_key_exists('verify', $_POST) {
      // create a recordset to retrieve the details ready for display
    } elseif (array_key_exists('insert', $_POST) {
      // insert the details in the the new table
    If you're not comfortable coding PHP yourself, the easy way to do it with Dreamweaver server behaviors is to use separate pages. In the first page, just create a form for the user to enter the serial number. Use the GET method to send the serial number to a separate page. In the new page, use the URL parameter containing the serial number to create a recordset to populate the insert form. Then apply an Insert Record server behavior using the POST method to insert the details into a new table.

  • Getting a field value from the first page on the second page in HTML

    I have a 2 page form I'm presenting in HTML to the user. The first page they select an action, enter a USERID and click the next page button. (The button executes "xfa.host.pageDown();" on the click action at the server)
    On the initialize of the second page I try to get the value of the USERID field from the first page and create a SQL statement to open my data connection. The issue I have is that I cannot get the value of the USERID field. This code works cause if I hardcode a valid value the query works. I tried to work around this by putting the same field on page 2, but it still did not work but the field was populated with displayed. I only assume the data is not populated at the time the initialize is invoked.
    Here is my code on the initialize..
    xfa.sourceSet.nodes.item(0).resolveNode("#command.query").commandType = "text"
    xfa.sourceSet.nodes.item(0).resolveNode("#command.query").select.nodes.item(0).value = "Select * from TABLE where userid = '" + xfa.form.resolveNode("form1.Page1.txt_EmployeeLogin").rawValue + "'"
    xfa.sourceSet.DataConnetion.open()
    Any help is greatly appreciated.
    THANKS!!

    Hi Steve,
    If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.
    Jared

  • To populate another alv grid's field with value selected from search help

    Hi,
    I have two fields in alv grid, first column holds code and the second one holds code's description. Also I have a search help includes these two fields. The search help is attached to the first column. The requirement is, when I select a code from the search help, second column should be populated with selected code's description.
    Any help will be appreciated. Thanks..

    Hi,
    have a look into Report: BCALV_EDIT_03.
    Regards, Dieter

  • Populate Values for Drop Down by Index in Table in Web Dynpro Java

    Hi Experts,
    I have a table and having a column table cell editor as Drop Down by Index.
    I have created the table node (tbnode) and child node for DDBI (ddbinode) and set the singleton property for DDBI node to false.
    I have same local variable node as same as above node and the values are available.
    I have one button ADD.On click the add button i need to populate the values to table node and as well as DDBI Node.
    I created supply function for DDBI node and populate the values for DDBI Node.
    Add Method:
    IPrivateMdTest8CompView.ItbnodeElement tbnode = wdContext.nodetbnode().createtbnodeElement();
    tbnode.setDescription(wdContext.currentCn_LocalVariableElement().getDescription);
    wdContext.nodetbnode().addElement(tbnode);
    Supply Function Method:
    for(int j=0;j<wdContext.nodetbnode().size();j++)
    wdContext.nodeddbinode().setLeadSelection(j);
    IPrivateMdTest8CompView.IddbinodeElement ddbinode = wdContext.nodeddbinode().createddbinodeElement();
    ddbinode.setddvalue(wdContext.currentCn_localddvalueElement().getddvalue);
    wdContext.nodeddbinode().addElement(ddbinode);
    Problem is one i got the values in the drop down and i click the second row in table again the supply function calls and reset the first row drop down to original value.
    If you any problem like please provide the solution.
    Thanks & Regards,
    SatheshKumar R

    If you created the supply method by setting the supply property of the node, you should have variable 'node' available as argument of the supply method, which will be related to the table row of the triggered dropdown. Opening the dropdown does not change the lead selection of the parent node, so
    ddbinode = wdContext.nodeddbinode().createddbinodeElement();
    wdContext.nodeddbinode().addElement(ddbinode);
    does always relate to the first row of the table (given that leadSelection == 0). With the node variable you can
    IddbinodeElement ddbiElement = node.createddbinodeElement();
    node.addElement(ddbiElement);

  • Displaying the current users information instead of the value of the person who completed the form in the first place.

    I found this fantatic post regarding querying the user profile service 
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx?pi47623=2#comments 
    However i have an issue whenever the form is opened again either to view or edit, it displays the current users information
    instead of the value of the person who completed the form in the first place.
    Please help me, I'm turning more grey each minute

    I think it is how the current user information is stored based on your logic.
    You might be quering current value again when loading the form (Form load Rule).
    you have to tweak your logic, after the user submits the form you can set the username to the one who saved it.
    or in form load, write a logic to see if the form was not saved before and then query the username( by using internal field like "formstatue")
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if the reply helps you

Maybe you are looking for

  • How to ivoke a method on an object of a private class

    When I did it I got a java.lang.IllegalAccessException.

  • How to use table in standard text

    Hi, I created one standard text using SO10 and I need to populate my internal table data values in the standard text. Below is the standard text i created. XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX

  • Why won't my computer download the newest iTunes?

    I run my iTunes and music from an external yard drive and in order to update to iOS 5 I need to update to iTunes 10.5 but. After waiting for it t finish downloading several times, it says "an error has occurred" and it won't install! Please help!! I

  • Create 1.4 PDF with Framemaker / Distiller 11

    System: Windows XP SP3 In our office we have a small problem. We want to create PDFs with the version 1.4. We are creating those PDFs from the Framemaker and use the Distiller (both are the newest versions). I can't understand why it doesn't work, if

  • Thumbnails not displaying on youtube or facebook.

    I made some changes to my computer the other day and now have no idea how to fix what may have potentially caused the thumbnails on youtube and facebook to no longer display. I checked to see if the thumbnails worked in Internet Explorer and Chrome a