Post values from selection screen into vkm5 transaction

Hi all,
i need to create a report , when user enters values in the selection screen of that report, that values must be transported into a transaction VKM5 and then that transported values must be updated in a ztable.
ex:
in selection screen if user enter doc no:xxxxxx
                                                     date:  20.09.2011
                                                     Reason for release: some text
then that doc no: xxxxx must be transported into vkm5 transaction and that values(selection screen values) must be uploaded into a ztable.
i tried the below code
TABLES: ZVKM5.
data: IT_ZVKM5 type standard table of ZVKM5,
      WA_ZVKM5 type ZVKM5.
PARAMETERS    : S_VBELN LIKE ZVKM5-VBELN ,
                s_date LIKE  zvkm5-bldat ,
                s_text LIKE  zvkm5-text .
call transaction 'VKM5'.
*LOOP AT IT_ZVKM5 INTO WA_ZVKM5.
   WA_ZVKM5-VBELN = S_VBELN.
   WA_ZVKM5-bldat = S_DATE.
   WA_ZVKM5-text  = S_TEXT .
   modify ZVKM5 from table IT_ZVKM5.
  if sy-subrc = 0.
  endif.
*ENDLOOP.
Kindly suggest me,
thanks in advance,
ben2012.

Thanks to all ,
Solved by me.
REPORT  ZVKM5.
TABLES: ZVKM5, vbuk.
types: begin of ty_zvkm5 ,
       vbeln type VBELN_VL,
       BLDAT type BLDAT,
       TEXT type TEXT,
       UNAME TYPE CDUSERNAME,
  end of ty_zvkm5.
TYPES: BEGIN OF TY_CDHDR,
       OBJECTID TYPE CDOBJECTV,
END OF TY_CDHDR.
DATA: IT_CDHDR TYPE TABLE OF TY_CDHDR,
      WA_CDHDR TYPE TY_CDHDR.
data: IT_ZVKM5 like ZVKM5 occurs 0 with header line,
      WA_ZVKM5 type ty_ZVKM5.
  DATA: bdcdata_wa  TYPE bdcdata,
        bdcdata_tab TYPE TABLE OF bdcdata.
data: date type STRING.
PARAMETERS    : S_VBELN LIKE ZVKM5-VBELN ,
                s_date LIKE  zvkm5-bldat ,
                s_text LIKE  zvkm5-text .
      CLEAR bdcdata_wa.
      bdcdata_wa-program  = 'RVKRED05'.
      bdcdata_wa-dynpro   = '1000'.
      bdcdata_wa-dynbegin = 'X'.
      APPEND bdcdata_wa TO bdcdata_tab.
      CLEAR bdcdata_wa.
      bdcdata_wa-fnam = 'BDC_CURSOR'.
      bdcdata_wa-fval = 'VBELN-LOW'. " pass the field name
      APPEND bdcdata_wa TO bdcdata_tab.
      CLEAR bdcdata_wa.
      bdcdata_wa-fnam = 'VBELN-LOW'. " pass the field name
      bdcdata_wa-fval =  S_VBELN. " pass the date here
      APPEND bdcdata_wa TO bdcdata_tab .
call transaction 'VKM5' using bdcdata_tab .
REFRESH IT_ZVKM5.
SELECT  OBJECTID
        FROM CDHDR INTO TABLE IT_CDHDR.
LOOP AT IT_CDHDR INTO WA_CDHDR.
IF WA_CDHDR-OBJECTID  = S_VBELN.
move s_vbeln to it_zvkm5-vbeln.
move S_date to it_zvkm5-bldat.
move s_text to it_zvkm5-text.
MOVE SY-UNAME TO IT_ZVKM5-UNAME.
append it_zvkm5 to it_zvkm5.
modify zvkm5 from  table it_zvkm5.
UPDATE zvkm5.
ENDIF.
ENDLOOP.
CLEAR: S_VBELN, S_DATE, S_TEXT.

Similar Messages

  • Problem in getting parameter value from selection screen in web dynpro abap

    Hi,
    I am facing problem in getting parameter value from selection screen.
    Please find my code below:
    DATA LT_PAR_ITEM TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    FIELD-SYMBOLS:<FS_PAR_ITEM> LIKE LINE OF LT_PAR_ITEM,
                                 <FS_OBJ_USAGE>    TYPE REF TO data.
      WD_THIS->M_HANDLER->GET_PARAMETER_FIELDS( IMPORTING ET_FIELDS = LT_PAR_ITEM ).
      LOOP AT LT_PAR_ITEM ASSIGNING <FS_PAR_ITEM>.
        CASE <FS_PAR_ITEM>-M_ID.
          WHEN `OBJ_USAGE`.
             ASSIGN <FS_PAR_ITEM>-M_VALUE->* TO <FS_OBJ_USAGE>.      
    [ Here, sy-subrc is 4,  <FS_OBJ_USAGE> is not assigning.]
        ENDCASE.
      ENDLOOP. 
    So, can any one solve this problem.
    Thanks in advance,
    Radhika

    Hi Radhika,
    Try using GET_RANGE_TABLE_OF_SEL_FIELD...
    Please Refer below code..
       DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
      DATA: WSFLIGHT TYPE SFLIGHT.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
    Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
      CLEAR ISFLIGHT. REFRESH ISFLIGHT.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
                           WHERE CARRID IN <FS_CARRID>.
      NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
      NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
    Thanks,
    Regards,
    Kiran

  • HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?

    HI,
    HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
    thanks,
    samba.

    By selection screen, what do you mean?   There is no selection screen in WDA as there was in classic dynpro. Do you mean you are using the Select-Options reusable component?  Are you wanting to call a standard transaction via ITS - SAPGUI for HTML?  Please provide more details to your question.

  • How to put values from selection screen to  ztable

    hi all,
    i have created a ztable.
    now i want to put data through se38.
    i have given 5 parameters in selection screen same as there in ztable.
    now if i put values in selection screen then it should put that values to my ztable .
    how can i put values into my ztable.
    i used insert but not workiing.

    Hi,
    Try this.
    TABLES : ztable.
    SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETER : p_field1 TYPE field1_in_ztable,
                            p_field2 TYPE field2_in_ztable.
                            p_field3 TYPE field3_in_ztable.
                            p_field4 TYPE field4_in_ztable.
                            p_field5 TYPE field5_in_ztable.
    SELECTION-SCREEN:END OF BLOCK b1.
    DATA : itab TYPE TABLE ztable,
                 wa_itab TYPE ztable.
    AT SELECTION-SCREEN.
          MOVE p_field1 TO wa_itab-field1.
          MOVE p_field2 TO wa_itab-field2.
          MOVE p_field3 TO wa_itab-field3.
          MOVE p_field4 TO wa_itab-field4.
          MOVE p_field5 TO wa_itab-field5.
    INSERT ztable FROM wa_itab.
    IF sy-subrc = 0.
    MESSAGE 'Successfully saved' TYPE 'I'.
    ENDIF.
    Thanks,
    Sri.
    Edited by: Sri on Jul 28, 2009 4:15 PM

  • Unable to retreive values from selection screen built using WDR_SELEC_OPTIO

    Hi All,
    I have created a selection screen as below
    lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
    *  ASSIGN lr_field->* TO <fs_range>.
    *  ls_date-sign   = 'I'.
    *  ls_date-option = 'EQ'.
    *  ls_date-low    = 'US'.
    *  APPEND ls_date TO <fs_range>.
    * Add the select-option to the group
      wd_this->m_handler->add_selection_field(
        i_id           = 'FLOW'
        i_within_block = 'PROC'
        i_no_intervals = abap_true
        it_result      = lr_field ).
    If i enter some value  and click a button to retireve the values as below
    DATA
        lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
    types: ty_flow type range of yfmtflow.
      FIELD-SYMBOLS:
        <fs_sel_item> LIKE LINE OF lt_sel_item,
        <fs_process>   TYPE yfmtprocess,
        <fs_flow>   TYPE ty_flow.
    * Get the selection-screen items
      l_handler->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Retrieve the values from the select-options items
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PROCESS`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
          WHEN 'FLOW'.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
        ENDCASE.
      ENDLOOP.
    <fs_flow> is empty
    but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
    Is it the standard functionality ,if yes how can we overcome
    Thanks
    Bala Duvvuri

    Am giving clear coding of select options.
    nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID  FIELD,
    FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
    WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
    REQUIRED VIEW
    Data: lt_range_table type ref to data,
         read_only type abap_bool.
    WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
    >WD_CPIFC_SELECT_OPTIONS( ).
    WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
    >INIT_SELECT_SCREEN( ).
    WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
         I_DISPLAY_BTN_CANCEL = ABAP_FALSE
         I_DISPLAY_BTN_CHECK = ABAP_FALSE
         I_DISPLAY_BTN_RESET = ABAP_FALSE
         I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER-
    >CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
    WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
              I_ID = 'S_CARR_ID'
              IT_RESULT = LT_RANGE_TABLE
              I_READ_ONLY = READ_ONLY ).
    BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
    ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
    USING SELECTI OPTIONS VALUES)
    fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
    CONTEXTB---FLIGHT NODE )
    ***THEN BELOW CODE
    DATA: RT_CARRID TYPE REF TO DATA.
    DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
    FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
    RT_CARRID = WD_THIS-> M_HANDLER-
    >GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    ASSIGN RT_CARRID-> TO <FS_CARRID>.*
    SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
       FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
    NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ).

  • Passing the values from selection screen to screen painter

    Hello Friends,
    I'm making one report program in which im calling  one screen which i have designed, in my selection screen there is a select option for customer  tht accepts value range now i want to select all the customers entered in select options and pass these values in screen(screen painter).
    pls guide me how this can be done.
    Regards,
    Sunny

    Screen painter is a tool in ABAP dev workbench used to create the screens using the
    T-code SE51. In the screen painter, you can define the following interface elements with their associated attributes.
    1. Input/Output Fields
    2. Field Names
    3. Checkboxes
    4. Radio Buttons
    5. Group Boxes
    6. Sub screens.
    7. Pushbuttons with No Fixed Position
    Create a Z program in tcode SE38.
    Go to transaction SE51.
    Enter the created program name and screen number.
    Click on flowlogic tab. 
    Uncomment the statement u201C MODULE STATUS_0100 u201C. 
    CASE SY-UCOMM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'DISPLAY'.
          SELECT SINGLE Fileds to selsct
               INTO (interanl table or tablename-fileds)
          WHERE Condition.    WHEN 'CLEAR'.
          CLEAR table.
      ENDCASE.
    ENDMODULE.

  • No values from selection screen

    Hi ppl,
    I have written a report program which has 3 parameters on the selection screen (Personnel number - pernr, trip number - reinr and status - abrec).
    I have a subroutine to check for the validity of the personnel number entered on the screen. The other two parameters do not have any validity check.
    I am using these 3 parameters in my SELECT statement. But, the problem is that when I execute it, at runtime, only the parameter for personnel number shows the value entered on the selection screen. The other two parameters show initial value at runtime though an entry has been made on the selection screen. Thus, it returns a subrc value of 4 though there are matching entries.
    Has anybody face such a problem? Please advise.
    Thanks.

    Hi David,
    Mentioning the event AT SELECTION SCREEN should resolve your problem.
    This will ensure that the values are picked from the selection sreen for all the parameters.
    (Else, if you do not use this event, your SELECT statement will not execute successfully the first time. But, if you execute your program again, it will fetch correct values.)
    Hope it solves your problem.
    Thanks,
    Dawood.

  • Posting values from a table into checkboxes in a checkboxgroup

    Here is my situation.
    I have a table I am reading into my web dynpro.  There are five fields, each may or may not contain an 'X'.
    I have a checkboxgroup in my web dynpro.  What I need to do is read field one, and if it is 'X', set the first checkbox in the group to true.  Then do the same with the other four fields.  I am using a checkbox group because I am reading the labels for the fields from an existing table.
    I am have not used a checkboxgroup so this is new to me.  Can anyone provide some code examples I can use to get my head around this?
    Thanks in advance.

    Hi,
    See the help here. [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cd/ad884118aa1709e10000000a155106/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cd/ad884118aa1709e10000000a155106/content.htm]
    See the example component as described on the help page.
    Basically you need a context-node of cardinality 0..n. The number of element in the node represents number of checkboxes in the group.
    bind the enabled property based on the value X from the table column.

  • Add a New Field to Selection Screen of VL10 Transactions problem

    Hello,
    i have tried to add a selection field in the VL10G. I have used the docu from Gaurav Jagya (Thanks to Gaurav) an followed the steps. Here you can find the docu: Link: [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e07c282f-e2b4-2c10-e4b3-a314fc17b6a1]
    In the Step 2 , Point 4 i declare the Select option ST_MTART and use it later in Step 5  in the form USEREXIT_SELECT_OPTIONS_TRANSF.
    Step 2.
    4. Write the declaration of new select-option inside include ZV50RSEL_MTART.
    DATA: V_MTART TYPE MARA-MTART.
    SELECT-OPTIONS: ST_MTART for V_MTART.
    Step 5. Transfer values from selection screen to range.
    For this step, again an access key is required to modify include V50R_USEREXIT_TRANSF.
    1. Open include V50R_USEREXIT_TRANSF in change mode. It will ask for an access key. Enter the same and proceed.
    2. Write following line of code inside form USEREXIT_SELECT_OPTIONS_TRANSF:
    CX_SELECT_OPTIONS-MTART = ST_MTART[].
    When i start the VL10G it works fine, but when i start another VL10* transaction i get a dump. Example VL10:
    Runtime Errors         SYNTAX_ERROR
    Date and Time          20.04.2010 13:54:00
    Short text
         Syntax error in program "RVV50R10C ".
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLV50R_PRE" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
         The following syntax error occurred in program "RVV50R10C " in include
          "V50R_USEREXIT_TRANSF " in
         line 18:
         "field "ST_MTART unknown. .."
    It dumped, because the form V50R_USEREXIT_TRANSF is used in EVERY VL10* transaction and the select-option is declared ONLY in my Z-include.
    Is the someone out there, who has solved the problem? Is the an error in the docu or am i wrong?
    Thanks!
    Andreas

    Has there been any further information on this issue in this or any other threads. I am encountering the same issue as identified by Andreas.
    Thanks,
    Brian

  • Exporting and importing a field value from one screen to another in BSP

    Hi All,
    I am working on a BSP application which consists of multiple screens. I have to export the value corresponding to a value selected from a drop down and import it in another screen so that in the next screen values can be populated corrsponding to the value selected in the drop down in the first screen.
    I tried using SET/GET parameter and also EXPORT/IMPORT so that I can get value from one screen into another screen but both the statements are not working in BSP....
    Please help...
    Vivek Gupta
    Edited by: guptav_infy on Feb 21, 2010 11:33 AM

    Hi All,
    This question is still un answered. please reply ..
    Vivek

  • How to add Material type(MTART) field on Selection screen of MB5B transaction code.

    Hi All,
        Please let me know how to add material type field on selection screen of MB5B transaction
    For that i made copy ZMB5B_COPY of original report RM07MLBD.
    Thanks in adv .
    Samadhan

    Hi,
    Once you copied the standard report to Z report, you can MTART in selection screen like below.
    and in order to inlcude the same in programming logic, we have three option.
    1) Check all related select queries, and include MTART in SELECT query using inner join with MARA.
    2) In START-OF-SELECTION event fill MATNR as shown below.
    3) If user entered any value in MTART, then before displaying the report just check material type of each material in the final internal table(which is used to display report) delete enteries from internal table accordingly.
    START-OF-SELECTION.
    IF MTART[] IS NOT INITIAL AND MATNR[] IS INITIAL.
        SELECT MATNR FROM MARA INTO MATNR-LOW WHERE MTART IN MTART.
          MATNR-OPTION = 'EQ'.
          MATNR-SIGN = 'I'.
          APPEND MATNR.
          CLEAR MATNR.
        ENDSELECT.
    ENDIF.
    The above option has one limitation: The selection screen variables has some restriction, please read the below thread.
    Facing problem in select statement dump DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S
    Getting Dump in the select query has more than 2000 entries
    Hope this will work for you .
    regards,
    Rajesh Sadula.

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • How we can get the values  from one screen to another screen?

    hi guru's.
         how we can get the values  from one screen to another screen?
              we get values where cusor is placed but in my requirement i want to get to field values from one screen to another screen.
    regards.
      satheesh.

    Just think of dynpros as windows into the global memory of your program... so if you want the value of a field on dynpro 1234 to appear on dynpro 2345, then just pop the value into a global variable (i.e. one defined in your top include), and you will be able to see it in your second dynpro (assuming you make the field formats etc the same on both screens!).

  • How to refresh value in selection screen field

    Hi Experts,
    I have a requirement to refresh the value in selection screen.while i run the report in selection screen i selecting one variant for look the output if i use some other field value with same variant without save its working fine i am avle to see the data but while i come back to again selection screen and selecting some other variant that extra add value is not getting refresh its showing with new variant.Its happening for only one variant not for all if i select some other variant then its getting refresh value in same field.Any one can help me for this issue.
    Thanks.

    Hi,
    That means, I believe - the value that is "not changing" is saved in the particular variant. You can easily verify it by starting the report without variant and then selecting the variant in question. Remove the value from screen and save the variant again. Don't forget to check of variant needs to be transported from development system...
    cheers
    Janis

Maybe you are looking for

  • Help to read TKPROF file in correct way

    Hi, I need help to understand what is going wrong. I have one query executed with different bind variables values. Case 1: Execution time is about 7.5 hours when :v6=:v3=:v4 (these are date bind variables values) Case 2: Execution time is about 2 min

  • Problem with serial number with crossgrade

    We are upgrading FCP 4.5 with crossgrade, but the old serial is not working. My understanding is that if you are upgrading from FCP 4.5, then you also need a new serial number. That we didn't get. Am I correct or did someone crossgrade from FCP 4.5 w

  • Problems with aspect ratio metadata filtering, am I doing things wrong?

    Hi, I tried to filter out all my pictures in a collection that has a portrait aspect ratio but LR is doing it all wrong. As you can see, there is a mix of landscape and portraits even though portrait is filtered. I tried to look at some of my other c

  • IWeb Project File

    Hi, I recently zeroed out my hard drive to do a clean install. I've now reinstalled everything but can't seem to find the project file for iWeb. I have my old system backed up so everything that used to be there should still be available. Where does

  • Where do you assign the Applicant Acknowledgement letter in E-Recruiting?

    Hi All, Where do you go to assign the applicant acknowledgement email correspondent letter in E-Recruiting?  I want to be able to choose which applicant acknowledgment letter I wish to send to an applicant when they apply to a job. Additionally, what