F4 Help IN ALV (OOPs) based on value entered in Other colunm.

Hi,
I have developed a module pool using ALV GRID Display.
i have two fields in it. and for the second field i should provide F4 help. and the list in the f4 help should be based on the value enterd in first column.
below is my code.
MODULE BPO_100 OUTPUT.
DATA: LT_FCAT TYPE LVC_T_FCAT.
DATA: ls_fcat    TYPE lvc_s_fcat.
DATA: wa type t_znout.
*DATA: it_kd1 LIKE zish_pm_cs_kd1fd OCCURS 0 WITH HEADER LINE.
SELECT * FROM zish_pm_cs_kd1fd INTO TABLE it_kd1 WHERE einri = rnpa1-einri.
  IF sy-subrc = 0.
    SORT it_kd1 BY sno.
  ENDIF.
  DELETE ADJACENT DUPLICATES FROM it_kd1 COMPARING fieldname.
LOOP AT it_kd1 into wa.
clear wa-value.
MODIFY it_kd1 FROM wa.
ENDLOOP.
       ls_fcat-fieldname = 'FIELDNAME'.
       ls_fcat-scrtext_l = 'Field name'.
       ls_fcat-scrtext_m = 'Field name'.
       ls_fcat-scrtext_s = 'Field name'.
       ls_fcat-tabname   = '1'.
       ls_fcat-col_pos = '1'.
       ls_fcat-outputlen = 15.
       APPEND ls_fcat TO lt_fcat.
       ls_fcat-fieldname = 'VALUE'.
       ls_fcat-scrtext_l = 'Value'.
       ls_fcat-scrtext_m = 'Value'.
       ls_fcat-scrtext_s = 'Value'.
       ls_fcat-tabname   = '1'.
       ls_fcat-col_pos = '2'.
       ls_fcat-outputlen = 15.
       ls_fcat-edit = 'X'.
       ls_fcat-f4availabl = 'X'.
       APPEND ls_fcat TO lt_fcat.
IF G_CUSTOM_CONTAINER1 IS INITIAL.
create a custom container control for our ALV Control
    CREATE OBJECT g_custom_container1
        EXPORTING
            container_name = g_container1
        EXCEPTIONS
            cntl_error = 1
            cntl_system_error = 2
            create_error = 3
            lifetime_error = 4
            lifetime_dynpro_dynpro_link = 5.
        IF sy-subrc ne 0.
add your handling, for example
      CALL FUNCTION 'POPUP_TO_INFORM'
        EXPORTING
          titel = 'ZISH_SCRN_ALV'
          txt2  = sy-subrc
          txt1  = 'The control could not be created'(510).
    ENDIF.
create an instance of alv control
    CREATE OBJECT grid1
           EXPORTING i_parent = g_custom_container1.
  CALL METHOD grid1->set_table_for_first_display
           EXPORTING
            i_structure_name = 'ZISH_PA_ZNOUT'
      i_default        = gs_test_1700-vari_default
             i_default        = 'X'
            i_save           = gs_test_1700-vari_save
            is_variant       = ls_vari
            is_layout        = gs_layout1
           CHANGING
             it_outtab        = it_kd1
             IT_FIELDCATALOG  = LT_FCAT.
ENDIF.
ENDMODULE.                 " BPO_100  OUTPUT
Edited by: Guru Ram on Sep 24, 2009 8:58 AM

See sample code.
I have 2 fields  MATNR and DESC in screen 100. Change it according to ur needs.
In screen flow logic,
PROCESS ON VALUE-REQUEST.
  FIELD  desc MODULE module_desc. " F4 for screen field DESC based on value entered in field MATNR
In report,
MODULE module_desc INPUT.
  TABLES: ddshretval.
  DATA:  l_t_dynpread LIKE dynpread OCCURS 0 WITH HEADER LINE,
           l_t_dynpread1 LIKE dynpread OCCURS 0 WITH HEADER LINE.
  DATA: l_t_retdynr TYPE TABLE OF ddshretval,
          l_wa_retdynr LIKE LINE OF l_t_retdynr.
  DATA: BEGIN OF g_t_desc OCCURS 0,
        maktx TYPE makt-maktx,
        END OF g_t_desc,
        wa LIKE g_t_desc.
  l_t_dynpread-fieldname = 'MATNR'.  " Field1 name
  APPEND l_t_dynpread.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname               = sy-repid
      dynumb               = '0100'
    TABLES
      dynpfields           = l_t_dynpread
    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.
  READ TABLE l_t_dynpread INDEX 1.
  IF l_t_dynpread-fieldvalue IS NOT INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'  " Converting matnr to 18 digits
EXPORTING
input = l_t_dynpread-fieldvalue
IMPORTING
output = l_t_dynpread-fieldvalue.
    SELECT maktx FROM makt INTO TABLE g_t_desc WHERE matnr = l_t_dynpread-fieldvalue.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
            EXPORTING
              retfield        = 'MAKTX'
              dynpprog        = sy-repid
              dynpnr          = sy-dynnr
              value_org       = 'S'
            TABLES
              value_tab       = g_t_desc
              return_tab      = l_t_retdynr
            EXCEPTIONS
              parameter_error = 1
              no_values_found = 2
              OTHERS          = 3.
    READ TABLE l_t_retdynr INTO l_wa_retdynr INDEX 1.
    IF sy-subrc = 0.
      l_t_dynpread1-fieldname = l_wa_retdynr-fieldname.
      l_t_dynpread1-fieldvalue =  l_wa_retdynr-fieldval.
      APPEND l_t_dynpread1.
      l_t_dynpread1-fieldname = 'DESC'. " Field2 name
      APPEND l_t_dynpread1.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
        TABLES
          dynpfields           = l_t_dynpread1
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          OTHERS               = 8.
    ENDIF.
  ENDIF.
ENDMODULE.                 " module_desc  INPUT
Thanks.

Similar Messages

  • Search Help for input field2 based on value entered in input field 1

    Hi All,
    I have a requirement where in my view, i have two fields.
    1. PO
    2. PO Item
    For PO i could get the standard search help from DDIC, but i need to provide search help for PO Item based on PO selected.
    How can i do that. Any help is highly appreciated.
    Thanks,
    Ajay

    Hi Ajay ,
    following steps cn help u :
    1 Declare the WDR_OVS Component in the used component list in your WD component .
    2  Now go to the View, in the Properties Tab click the Create Controller Usage Button.
    3 It will open a screen with Component Use Entries. There select the Component Use OVS with Interface Controller . Press Enter.
    4 Go to the Context Tab, Right Click the Context and select Create à Attribute , for PO item in ur case .
    5 In the Input Help Mode Field, Select u2018Object Value Selectoru2019 from the dropdown. Then press F4 in the Field OVS Component Usage.
    6 Declare one event handler method with Name ON_OVS in the Method tab of the view. Then Press F4 in the Column Event. 
    Select the Event OVS as shown below and Press Enter. 
    for more info and illustration , also refer :
    http://help.sap.com/saphelp_erp2005/helpdata/EN/30/d7fa41c915da6fe10000000a1550b0/content.htm
    https://wiki.sdn.sap.com/wiki/display/WDABAP/ABAPWDObjectValueSelector(OVS)
    http://wiki.sdn.sap.com/wiki/display/Snippets/OVSSearchHelpinWebDynproAbap
    regrds,
    amit

  • Hello Friends need help in ALV oops

    Hello,
    My requirement is that in my ALV ouptut i will edit one cell when i am editing i.e if its is 200,00 i will change it to 300,00 before changing it should ask me wheather to change it or not i need to dispaly a dialog box with yes or no option if i click yes then it should accept the value 300,00.
    I am using ALV OOPS.

    Hi,
    You can achieve this as below,
    DATA: w_result TYPE c.
      METHOD handle_user_command.
    *   Handle own functions defined in the toolbar
        CASE e_ucomm.
          WHEN 'CHANGE'.
    CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
      EXPORTING
       defaultoption       = 'N'
        textline1           = 'Do you want to change the value?'
    *   TEXTLINE2           = ' '
        titel               = 'Confirmation for change'
    *   START_COLUMN        = 25
    *   START_ROW           = 6
    IMPORTING
       answer              = w_result.
    IF w_result = 'J'. "J is for yes.
    "Write your logic for saving the changes
    ENDIF.
      ENDCASE.
      ENDMETHOD.                    "handle_user_command
    Hope thi helps you.
    Regards,
    Manoj Kumar P

  • Calling functions and inserting tables based on values entered

    Hello Everyone,
    I am creating a function as below:
    create or replace function func(flags in number,Ctry in varchar2) return number
    is
    maxv number;
    flagv number;
    begin
    flagv:=1;
    select max(num) into maxv from A;
    if flags =1 then
    insert into A(num,nam) values(maxv+1,Upper(Ctry));
    else
    flagv:=0;
    end if;
    return flagv;
    end;
    The function takes two parameters-The first one will be either 0 or 1.The second one will be name of a country.
    If the first parameter is 1 then we would insert the country name passed, to the table name A.If its 0 then no insertion occurs and the function would return a value 0.
    On compiling the function I get a success!.
    When I do a
    SQL>select distinct func(0,'UK') from B;
    it works well and returns 0
    However when I do
    SQL>select distinct func(1,'UK') from B;
    I expect an output of 1 & also expect UK to be inserted as anew row in the table A.However It throws an error saying "ORA-14551: cannot perform a DML operation inside a query .."
    It is very important for me to use select to call the function, as my application would fire a select with that function and based on the value entered would insert or not insert at the back end.
    Is there any way out to do this??
    variable temps number
    exec :number :=func(1,'UK');
    does work but I cant use this in my application.
    Hope you can help! Thanks!

    create or replace function func(flags in number,Ctry in varchar2) return number
    is
    PRAGMA AUTONOMOUS_TRANSACTION;
    maxv number;
    flagv number;
    begin
    flagv:=1;
    select max(num) into maxv from A;
    if flags =1 then
    insert into A(num,nam) values(maxv+1,Upper(Ctry));
    COMMIT;
    else
    flagv:=0;
    end if;
    return flagv;
    end;
    Is the above changes in BOLD enough or I need to do something else too in order to incorporate the autonomous transaction??
    I am not too familiar with autonomous transaction.Could you please suggest the changes I need if any more required??
    Thanks a ton for your suggestions!
    Message was edited by:
    user579245
    Message was edited by:
    user579245

  • Validate a field on selection screen based on value entered on anothr field

    HI,
    There is a program with some fields in selection screen in EWM. The first field is Warehouse. I need to add another field 'Entity to Dispose' in such that what ever value I enter in Warehouse field, its corresponding values should only be displayed as F4 help for 'Entity to Dispose' field.
    For eg: If I select the warehouse as 0799(lets say), then the F4 help for Entity to Dispose field should display only the values which are related to warehouse 0799 (and any other values pertaining to other warehouse should not appear).
    Could anyone suggest, how this can be achieved?
    Thanks in advance.
    Regards,
    Pavan

    Hi,
    You can use FM
    DYNP_VALUES_READ
    DYNP_VALUES_UPDATE
    to read the another field value and Using that field build your internal table for f4 values.
    and use FM F4IF_INT_TABLE_VALUE_REQUEST for F4 values..
    do this on AT SELECTION-SCREEN ON VALUE REQUEST FOR <YOUR_F4_FIELDNAME>.

  • Update age group picklist based on value entered in date of birth

    Hi Gurus,
    Have a requirement where in user would enter the date of birth on a contact record and would like to populate another custom field called age group at the time of creating a new record.
    The condition is some what like
    Age
    1 – 20 Teens
    21-40 Young Adults
    41-60 Adults
    60 – 100 Seniors
    I have tried using the age field but problem is that age is populated only when the record is saved.
    Update the age group via workflow works fine but the saved record has to be modified before triggering the workflow. we would like to avoid the additional step of modifying the record
    Is there any option to calculate age based on the value entered for date of birth - something like DOB Year - current year before saving a record or via post default without using workflows.
    Thanks in advance,
    Arun

    Hi
    The answer is yes, using the post default functionlaity.
    take a look in the folowign example:
    IIf(ToChar(Timestamp(),'DD/MM/YYYY')- [<DateofBirth>] < 20,'20','30')
    You will need to make something like that, but replace the '30' with another IIf expression, and so on for the next interval.
    note that date of birth should be between suqare brackets [  ] (it is shown here with underline for some reason...)
    Good luck
    Guy
    Edited by: Shinshan on 08:45 30/12/2009
    Edited by: Shinshan on 08:46 30/12/2009
    Edited by: Shinshan on 08:47 30/12/2009
    Edited by: Shinshan on 08:47 30/12/2009

  • How to display f4 help for a field based on value of another field

    Hello All,
    I have 4 fields : Sales Org : VBAK-VKORG, Distrib Channel : RV50A-VTWEG, Div : RV50A-SPART, Sold-to-party : KUAGV-KUNNR.
    The second field depends on the first one, the third on the second one and the fourth on the first field.
    However, when each of the second third and fourth fields' f4 help is displayed, the values are independent of the previous fields. How do I set the f4 help to display values based on the respective fields?
    Regards,
    Mithun

    Please be sure that you are searching the forums before posting. This exact same question was asked just yesterday:
    F4 help to input field
    In particular study the section and the linked help document for ddic search helps export/importing parameters and the requirements for DDic Structure/table usage for the parameter mapping.

  • Need to create search help for parameter 2 based on values in parameter1

    hi Specialists,
    I need to create a search help for parameters field 2 ( Country ) based on the values the user inputs in parameters field 1 ( Currency ). The values of field  Currency & Country will come from T001 table.
    The logic is : Based on a unique currency value ( fetched from T001 table ) user needs to get/see all Countries on his selection -screen.
    Can you guys let me know which FM can I use for above & how to pass various values i.e. parameters into that FM. EXplanation with an example/code is highly appreciable.
    Thanks
    Abhinav.

    Hi Abhinav,
    Use this demo code, its working:-
    This code selects sale document item based on the user entry for sales document on the screen field.
    REPORT  ztg_f1f4.
    CALL SCREEN 1010.
    *&      Module  GET_F4_HELP  INPUT
    *       text
    MODULE get_f4_help INPUT.
      TYPES : BEGIN OF it,
                posnr TYPE zvbap-posnr,
              END OF it.
      DATA : itab TYPE STANDARD TABLE OF it WITH HEADER LINE,
             tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE,
             vbeln TYPE zvbap-vbeln.
      CLEAR:   tb_dynpfields.
      REFRESH: tb_dynpfields.
      MOVE 'ZVBAP-VBELN' TO tb_dynpfields-fieldname. "screen field name
      APPEND tb_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                               = 'ZTG_F1F4'
          dynumb                               = '1010'
    *   TRANSLATE_TO_UPPER                   = ' '
    *   REQUEST                              = ' '
    *   PERFORM_CONVERSION_EXITS             = ' '
    *   PERFORM_INPUT_CONVERSION             = ' '
    *   DETERMINE_LOOP_INDEX                 = ' '
    *   START_SEARCH_IN_CURRENT_SCREEN       = ' '
    *   START_SEARCH_IN_MAIN_SCREEN          = ' '
    *   START_SEARCH_IN_STACKED_SCREEN       = ' '
    *   START_SEARCH_ON_SCR_STACKPOS         = ' '
    *   SEARCH_OWN_SUBSCREENS_FIRST          = ' '
    *   SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
        TABLES
          dynpfields                           = tb_dynpfields
    * 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.
      ENDIF.
      READ TABLE tb_dynpfields INDEX 1.
      IF sy-subrc EQ 0.
        vbeln = tb_dynpfields-fieldvalue.
      ENDIF.
      SELECT posnr FROM zvbap
        INTO TABLE itab
      WHERE
        vbeln = vbeln.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    *   DDIC_STRUCTURE         = ' '
          retfield               = 'POSNR'
    *   PVALKEY                = ' '
         dynpprog               = 'ZTG_F1F4'
         dynpnr                 = '1010'
         dynprofield            = 'POSNR'
    *   STEPL                  = 0
    *   WINDOW_TITLE           =
    *   VALUE                  = ' '
       value_org              = 'S'
    *   MULTIPLE_CHOICE        = ' '
    *   DISPLAY                = ' '
    *   CALLBACK_PROGRAM       = ' '
    *   CALLBACK_FORM          = ' '
    *   MARK_TAB               =
    * IMPORTING
    *   USER_RESET             =
        TABLES
          value_tab              = itab
    *   FIELD_TAB              =
    *   RETURN_TAB             =
    *   DYNPFLD_MAPPING        =
    * EXCEPTIONS
    *   PARAMETER_ERROR        = 1
    *   NO_VALUES_FOUND        = 2
    *   OTHERS                 = 3
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " GET_F4_HELP  INPUT
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Select Radiogroup value based on value entered?

    I have a search page with a text box and radiogroup. Right now when the user types something in the box, then selects one of the radio buttons (SSN or Last Name) my query results are dependent on which radio button is selected. So if a user wants to search on an SSN, they type in the SSN, select the SSN radio button, then clicks 'Search'. It has been requested that instead of having a user select a radio button, calculate which radio button is set based on the first character of what the user types. So if the first character in the text box is a letter, then automatically select the Last Name radio button. If the user types a number, then automatically select the SSN button. Is this possible?
    Thank you!

    You don't need to use JavaScript for this one. (I assume you don't use AJAX here...)
    First, make sure on your page you have the following:
    1- one textfield item (ex.: P1_SEARCH_PARAM)
    2- one radiobutton item (ex.: P1_PARAM_TYPE)
    3- a region report based on an sql query (or wathever region you have displaying records found using a query)
    4- a button to submit the search parameters entered by the user
    Second, you need an item computation triggered by the submit button (see no.4 from above). This computation is a page component that you will add on your page processing.
    The computation is a pl/sql block returning a value to be computed to your item P1_PARAM_TYPE.
    ex.:
    DECLARE
    l_retval varchar2(20);
    BEGIN
    /* TODO : loop on ascii char to test every characters*/
    IF instr(:P1_SEARCH_PARAM,'A') = 1 THEN
    l_retval := 'LN'; --last_name
    ELSIF instr(:P1_SEARCH_PARAM,9) = 1 THEN
    l_retval := 'SSN'; --ssn
    END IF;
    return l_retval;
    END;
    Third, after submit, branch to the same page, your checkbox will have the correct value.
    Hope this helps.
    Louis-Guillaume
    Homepage : http://www.insum.ca
    Blog : http://insum-apex.blogspot.com

  • Populating a Sharepoint attendance list based on values entered in second list: Tracking attendance

    Hello,
    My organization is looking to move our attendance tracking from Excel to Sharepoint, and to automate the process while we're at it.
    In short: the company needs to track employee attendance at seventeen different training events (via the "Training Attendance" list). The facilitator of each event updates a different list ("Meeting Tracker") after each session, creating
    a new item on the list to track attendees. On this new item, the facilitator also looks up and chooses (via a People/Group column) all of the attendees (in the "Attendees" column). The title of each new item is the name of the training session, and
    this name also appears on the "Training Attendance" list.
    What I am looking to do is link this Attendees column on the Meeting Tracker to automatically populate the Training Attendance list. The idea is that when a facilitator updates the Meeting Tracker list with the names of all attendees, these attendees will
    automatically be marked as having attended that class on the Training Attendance list. While tracking in Excel I have used "VLOOKUP" and "COUNTIF" functions to achieve this same result.
    So far I have tried various methods to do this but have had no luck, mainly due to the fact that it does not appear possible to use a look up function with a People/Group column. 
    Does anyone know of any other solutions or workarounds for this problem? Any suggestions would be very appreciated.
    Thank you!

    Dear Niall
    Many thanks for all your help and support to help me with this issue.  I had a think about it over the weekend and basically the solution that seems to work is to clear the list box each box each time a drop down is entered using the PreOpen event and then when a drop down is selected with a value greater than 0 an item is added to the listbox using the addItem with the inclusion of the rawValue from the drop down list in the item addd to the list box.
    ie. if (Page1.DropDownList.rawValue != 0) {
    Page1.ListBox.addItem(Test - "+Page1.DropDownList.rawValue+"")
    Your suggestions and help got me there in the end so a big thanks and I think this way will improve the performance of the form compared to what I thought I might have to do.
    Many thanks
    Darren

  • 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.

  • Excise rates not reflecting in PO based on values entered in newly created condition table in TAXINN.

    Dear SAP Gurus,
    I have created a new condition table using t.code m/03 by taking a copy of existing standard condition table. I have assigned the newly created condition table to access sequence. After assignment of condition table i have entered the relevant excise rates in excise condition types using the newly created key combination through t.code FV12. When i enter the Tax Code in PO, excise duty rates are not reflecting in PO. When i am entering the excise rates in any other standard key combination, excise rates are reflecting in PO.
    Following are the fields in newly created key combination (Condition Table)
    1) Country
    2) Plant
    3) Control Code
    4) Tax Code
    Kindly help me in resolving the issue.
    Regards,
    Vinay

    HI,
    Check whether you have maintained the rates for the new tax code in FV11 also whether you have assigned the tax code to the company code ?
    Compare the tax code which is working in PO with the one which is not & find out if there is any difference.
    If you want to post the tax values to the new G/L in OB40 then maintain the same settings for the tax code which is working in PO.
    Thanks & Regards,

  • How to catch changed column values in alv oops using grid

    My requirement needs to catch changed column values in alv oops using grid .any method to do this.
    please help me out ,
    Tks in advance

    Have a look into the SAP standarad Programs those programs have the edit option on the ALV output.
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_10.
    Regards,
    Gopi ,
    Reward points if helpfull.

  • F4 help for select options based on parameter value

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

  • ALV OOPS report - Need help

    Hi Friends,
    I just want to convert a normal alv grid report to ALV OOPS report using classes,methods and objects, can you please help me on it.
    *I have sent a sample ALV grid report program.
    REPORT  YSDB_ALV_ECC NO STANDARD PAGE HEADING LINE-SIZE 260 LINE-COUNT 58.
    TABLES:
                    VBRK,
                    VBRP.
    TYPE-POOLS: SLIS.
    TYPES:
                  BEGIN OF Y_VBRK_STRUCT ,
                        VBELN TYPE VBRK-VBELN,
                        FKART TYPE VBRK-FKART,
                        FKDAT TYPE VBRK-FKDAT,
                        BUKRS TYPE VBRK-BUKRS,
                        NETWR TYPE VBRK-NETWR,
                  END OF Y_VBRK_STRUCT.
    TYPES:
                     BEGIN OF Y_VBRP_STRUCT,
                            VBELN TYPE VBRP-VBELN,
                            POSNR TYPE VBRP-POSNR,
                            MATNR TYPE VBRP-MATNR,
                            FKIMG TYPE VBRP-FKIMG,
                            AUBEL TYPE VBRP-AUBEL,
                            KOSTL TYPE VBRP-KOSTL,
                            PS_PSP_PNR TYPE VBRP-PS_PSP_PNR,
                            ARKTX TYPE VBRP-ARKTX,
                     END OF Y_VBRP_STRUCT.
    TYPES:
                  BEGIN OF Y_DISPLAY_STRUCT,
                        VBELN TYPE VBRK-VBELN,
                        FKART TYPE VBRK-FKART,
                        FKDAT TYPE VBRK-FKDAT,
                        BUKRS TYPE VBRK-BUKRS,
                        NETWR TYPE VBRK-NETWR,
                        POSNR TYPE VBRP-POSNR,
                        MATNR TYPE VBRP-MATNR,
                        FKIMG TYPE VBRP-FKIMG,
                        AUBEL TYPE VBRP-AUBEL,
                        KOSTL TYPE VBRP-KOSTL,
                        PS_PSP_PNR TYPE VBRP-PS_PSP_PNR,
                        ARKTX TYPE VBRP-ARKTX,
                  END OF Y_DISPLAY_STRUCT .
    DATA: W_INDEX LIKE SY-TABIX.
    DATA:  W_FIELDCATALOG TYPE SLIS_FIELDCAT_ALV.
    DATA:  T_FIELDCATALOG1 TYPE SLIS_T_FIELDCAT_ALV.
    DATA:  W_REPID TYPE SY-REPID.
    DATA: T_VBRK_ITAB TYPE STANDARD TABLE OF Y_VBRK_STRUCT .
    DATA: T_VBRP_ITAB TYPE STANDARD TABLE OF Y_VBRP_STRUCT .
    DATA: T_DISPLAY_ITAB TYPE STANDARD TABLE OF Y_DISPLAY_STRUCT.
    DATA: E_DISPLAY TYPE Y_DISPLAY_STRUCT.
    SELECT-OPTIONS S_VBELN FOR VBRK-VBELN.
    SELECT-OPTIONS S_BUKRS FOR VBRK-BUKRS.
    SELECT-OPTIONS S_FKDAT FOR VBRK-FKDAT.
    START-OF-SELECTION.
      PERFORM F_GET_DATA1.
      PERFORM F_PROCESS_DATA.
      PERFORM F_FIELDCATLOG.
      PERFORM F_DISPLAY_DATA.
      PERFORM F_CLEAR_FIELDS.
    *&      Form  get_data1
          text
    FORM F_GET_DATA1 .
      SELECT VBELN  FKART FKDAT BUKRS NETWR
        FROM VBRK
        INTO  TABLE T_VBRK_ITAB
       WHERE BUKRS IN S_BUKRS
         AND FKDAT IN S_FKDAT
         AND VBELN IN S_VBELN.
      IF SY-SUBRC NE 0.
        FREE: T_VBRK_ITAB.
      ENDIF.
      IF NOT T_VBRK_ITAB IS INITIAL.
        SELECT VBELN POSNR MATNR FKIMG AUBEL
               KOSTL PS_PSP_PNR ARKTX
          FROM VBRP
          INTO TABLE T_VBRP_ITAB
          FOR ALL ENTRIES IN T_VBRK_ITAB
         WHERE VBELN EQ T_VBRK_ITAB-VBELN.
        IF SY-SUBRC NE 0.
          FREE: T_VBRK_ITAB.
        ENDIF.
      ENDIF.
    ENDFORM.                                                    " GET_DATA1
          text
    -->  p1        text
    <--  p2        text
    FORM F_PROCESS_DATA .
      SORT T_VBRK_ITAB  BY VBELN.
      SORT T_VBRP_ITAB  BY VBELN.
      CLEAR: W_INDEX.
      UNASSIGN <FS_STRUCT1>.
      UNASSIGN <FS_STRUCT2>.
      LOOP AT T_VBRK_ITAB ASSIGNING <FS_STRUCT1>.
        READ TABLE T_VBRP_ITAB ASSIGNING <FS_STRUCT2> WITH KEY VBELN = <FS_STRUCT1>-VBELN BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          MOVE  SY-TABIX TO W_INDEX.
          WHILE SY-SUBRC  IS INITIAL AND <FS_STRUCT1>-VBELN = <FS_STRUCT2>-VBELN.
    *Header Items Moving
            MOVE:
                   <FS_STRUCT1>-FKART TO E_DISPLAY-FKART,
                   <FS_STRUCT1>-FKDAT TO E_DISPLAY-FKDAT,
                   <FS_STRUCT1>-BUKRS TO E_DISPLAY-BUKRS,
                   <FS_STRUCT1>-NETWR TO E_DISPLAY-NETWR.
    *Line items Moving
            MOVE: <FS_STRUCT2>-VBELN TO E_DISPLAY-VBELN,
                  <FS_STRUCT2>-POSNR TO E_DISPLAY-POSNR,
                  <FS_STRUCT2>-MATNR TO E_DISPLAY-MATNR,
                  <FS_STRUCT2>-FKIMG TO E_DISPLAY-FKIMG,
                  <FS_STRUCT2>-AUBEL TO E_DISPLAY-AUBEL,
                  <FS_STRUCT2>-KOSTL TO E_DISPLAY-KOSTL,
                  <FS_STRUCT2>-PS_PSP_PNR TO E_DISPLAY-PS_PSP_PNR,
                  <FS_STRUCT2>-ARKTX TO E_DISPLAY-ARKTX.
            APPEND E_DISPLAY TO T_DISPLAY_ITAB.
            CLEAR  E_DISPLAY.
                      ADD 1 TO W_INDEX.
            READ TABLE T_VBRP_ITAB ASSIGNING <FS_STRUCT2> INDEX  W_INDEX.
            IF SY-SUBRC NE 0.
              EXIT.
            ENDIF.
          ENDWHILE.
        ENDIF.
      ENDLOOP.
    ENDFORM.                                                    " GET_DATA3
    *&      Form  Fieldcatlog
          text
    -->  p1        text
    <--  p2        text
    FORM F_FIELDCATLOG .
      W_FIELDCATALOG-FIELDNAME = TEXT-001.
      W_FIELDCATALOG-SELTEXT_L = TEXT-002.
      MOVE : 1 TO W_FIELDCATALOG-COL_POS,
             20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-003.
      W_FIELDCATALOG-SELTEXT_L = TEXT-004.
      MOVE : 2 TO W_FIELDCATALOG-COL_POS,
               20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-005.
      W_FIELDCATALOG-SELTEXT_L = TEXT-006.
      MOVE : 3 TO W_FIELDCATALOG-COL_POS,
              20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-007.
      W_FIELDCATALOG-SELTEXT_L = TEXT-008.
      MOVE : 4 TO W_FIELDCATALOG-COL_POS,
             20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-009.
      W_FIELDCATALOG-SELTEXT_L = TEXT-010.
      MOVE : 5 TO W_FIELDCATALOG-COL_POS,
              20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-011.
      W_FIELDCATALOG-SELTEXT_L = TEXT-012.
      MOVE : 6 TO W_FIELDCATALOG-COL_POS,
             20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-013.
      W_FIELDCATALOG-SELTEXT_L = TEXT-014.
      MOVE : 7 TO W_FIELDCATALOG-COL_POS,
            20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-015.
      W_FIELDCATALOG-SELTEXT_L = TEXT-016.
      MOVE : 8 TO W_FIELDCATALOG-COL_POS,
             20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-FIELDNAME = TEXT-017.
      W_FIELDCATALOG-SELTEXT_L = TEXT-018.
      MOVE : 9 TO W_FIELDCATALOG-COL_POS,
             20 TO W_FIELDCATALOG-OUTPUTLEN.
      APPEND W_FIELDCATALOG TO T_FIELDCATALOG1.
      CLEAR W_FIELDCATALOG.
    ENDFORM.                    " Fieldcatlog
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_DISPLAY_DATA .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = W_REPID
          I_CALLBACK_TOP_OF_PAGE = 'AAAAAAAAADDAADA' "TEXT-021
          I_GRID_TITLE           = TEXT-020
          IT_FIELDCAT            = T_FIELDCATALOG1
        TABLES
          T_OUTTAB               = T_DISPLAY_ITAB.
      IF SY-SUBRC NE 0.
        EXIT.
      ENDIF.
      CLEAR: W_REPID.
      CLEAR: T_FIELDCATALOG1.
    ENDFORM.                    " DISPLAY_DATA
    *&      Form  F_Clear_fields
          text
    -->  p1        text
    <--  p2        text
    FORM F_CLEAR_FIELDS .
      FREE: T_VBRK_ITAB.
      FREE: T_VBRP_ITAB.
      FREE: T_DISPLAY_ITAB.
      CLEAR: W_FIELDCATALOG.
    ENDFORM.                    " F_Clear_fields
    Regards
    Dinesh

    In ALV oops,
    1. You need screen on which you must create a custom container. - screen 100
    2. In PBO of 100, create module for displaying ALV
    MODULE DISPLAY_ALV OUTPUT
    PERFORM CREATE_CONTAINER "IN WHICH YOU USE THE CREATE OBJECT METHOD OF CL_GUI_CUSTOM_CONTAINER
    PERFORM CREATE_ALV "IN WHICH YOU USE CREATE_OBJECT METHOD OF CL_GUI_ALV_GRID.
    PERFORM PREPARE_FIELDCAT "creating fcat using LVC_S_FCAT structure
    PERFORM DISPLAY "here you use the SET_TABLE_FOR_FIRST_DISPLAY method of CL_GUI_ALV_GRID class,
    where you provide the internal table name and fieldcat internal table
    ENDMODULE

Maybe you are looking for