How to create dynamic ON CHANGE statement? Please help!

Hi Experts,
   I have a requirement where my ON CHANGE criteria is dynamic. It is based on wa_charakeyfrmt-value which I am reading from a table. If it is 'DO' then ON CHANGE will have wa_errtabcopy-DO. Else if it is 'LI' then ON CHANGE will have wa_errtabcopy-LI. There will be many cases like this. So instead of writing so many IF/ELSE or SWITCH/CASE conditions is it possible to dynamically create ON CHANGE criteria for the last field. See the example code below:
   IF wa_charakeyfrmt-value = 'DO'. "On DO change
      LOOP AT i_errtabcopy into wa_errtabcopy
           WHERE sold_to = wa_errtab-sold_to.
              ON CHANGE OF wa_errtabcopy-key_value
                        OR wa_errtabcopy-rep_created_date
                        OR wa_errtabcopy-rep_created_time
                        OR wa_errtabcopy-rep_counter
                        OR wa_errtabcopy-DO.
              ENDON.
      ENDLOOP.
   ELSEIF wa_charakeyfrmt-value = 'LI'. "On LI change
      LOOP AT i_errtabcopy into wa_errtabcopy
           WHERE sold_to = wa_errtab-sold_to.
              ON CHANGE OF wa_errtabcopy-key_value
                        OR wa_errtabcopy-rep_created_date
                        OR wa_errtabcopy-rep_created_time
                        OR wa_errtabcopy-rep_counter
                        OR wa_errtabcopy-LI.
              ENDON.
      ENDLOOP.
     |
Thanks
Gopal

DATA: BEGIN OF text,
        word1(4) TYPE c VALUE 'This',
        word2(4) TYPE c VALUE 'is',
        word3(4) TYPE c VALUE 'a',
        word4(4) TYPE c VALUE 'loop',
      END OF text.
DATA: string1(4) TYPE c, string2(4) TYPE c.
DO 4 TIMES VARYING string1 FROM text-word1 NEXT text-word2.
  WRITE string1.
  IF string1 = 'is'.
    string1 = 'was'.
  ENDIF.
ENDDO.
SKIP.
DO 2 TIMES VARYING string1 FROM text-word1 NEXT text-word3
           VARYING string2 FROM text-word2 NEXT text-word4.
  WRITE: string1, string2.
ENDDO.

Similar Messages

  • BB apps is not working, how to create BB email add? please help

    BB apps is not working, how to create BB email add? please help

    If none of the blackberry apps are working and you are unable to setup an email address..... have you got a Blackberry Data Plan active on your account?

  • HOW TO CREATE AUTHORISATION OBJECT IN ABAP PLEASE HELP

    HOW TO CREATE AUTHORISATION OBJECT IN ABAP PLEASE HELP

    You can Use Transaction code: RSSM
    Check the following link
    http://www.sap-img.com/bc042.htm
    In SU20 you will have to create a CLass.
    After saving this double click this and you will taken to another screen where you can create Auth Object.
    You can create authorization fields in SU21 or use existing ones.
    You can also do above thru tcode SE80 Edit -> Other Object. In one the tabs you will see Auth. Objects .

  • Can't find any info on how to create folios for surface. Please help!

    Can anyone help me to find out the pixel dimensions that my folios need to be?
    I also need to understand why the posters of my folios won't show up in the library, nor do the names?
    If there is anywhere I can find this kind of info online. I've searched and searched and can find no guidelines, discussions or tutorials. Have Adobe created something without any documentation for the user?
    Thanks

    Use 1024x768 folios. Here's a help article:
    http://helpx.adobe.com/digital-publishing-suite/help/dps-apps-windows.html

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • How to create Dynamic Menu in 11g?

    Hello All,
    I am using JDeveloper/Adf 11g.
    Can you please tell me how to create Dynamic menu(means Menu will be created from table if we make any changes in table it will reflect to the Menu).
    Thanks.
    Neelmani Jaiswal
    (Madhav, Hayaghat)
    Edited by: Neelmani Jaiswal on Jan 6, 2009 11:01 AM
    Edited by: Neelmani Jaiswal on Jan 6, 2009 11:01 AM
    Edited by: Neelmani Jaiswal on Feb 3, 2009 8:46 AM

    Neelmani,
    How: write some code.
    The Web User Interface Developer's Guide for Oracle Application Development Framework will be helpful. Hint: you may want to read section 14.2 (especially 14.2.1, item 2, which talks about using iterators in a menu) OR section 17.5, which talks about creating menus to support page hierarchies.
    John

  • How to create dynamic connection string with variables using ssis.

    Hello,
    Can anyone let me know on how to create dynamic connection string with variables using ssis?
    Any help would be appreciated.

    Hi vinay9738,
    According to your description, you want to connect multiple database from multiple servers using dynamic connection.
    If in this case, we can create a Table in our local database (whatever DB we want) and load all the connection strings.  We can use Execute SQL Task to query all the connection strings and store the result-set in a variable of object type in SSIS package.
    Then use ForEach Loop container to shred the content of the object variable and iterate through each of the connection strings. And then Place an Execute SQL task inside ForEach Loop container with the SQL statements we have to run in all the DB instances. 
    For more details, please refer to the following blog:
    http://sql-developers.blogspot.kr/2010/07/dynamic-database-connection-using-ssis.html
    If there are any other questions, please feel free to let me know.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to create Dynamic Window in Smartforms

    Hi all,
    Could you please help me out on how to create Dynamic Window in smartforms excluding Main Window.
    Thanks in Advance.
    Vinay.

    hi,
    Hi,
    1.If you are creating the Different windows for the Countries,then In conditions tab of window specify the Condition i.e.
    company -code = '2201'.
    2.Then that window can trigger ofr that condition.
    3.Other wise, if you are using the different layouts ,then write the condition in Print program and call that form .
    reward me if helpful.

  • How to create dynamic connection in business view manager.

    Hi Sir,
    Can u explain how to create dynamic connection in business view manager.
    Thanks
    Vishali Raghava Raju

    HI Vaishali,
       Can you please elaborate your requirement ?
    -Regards
    B

  • How to create dynamic calc account in multi-plan type application

    Hi expert,
    I have a planning application with 3 plan types.
    I created a calculation script which fixed on accounts in plan type 1 only and the calculation suppose to calculate a "dynamiccalc" account with a member formula attached. Everytime I run the script, it takes very long time and I found there are sessions at the back of essbase with "Process local xref/xwrite request" request to other plan types.
    It does not has this kind of session if I change the account to "store".
    Would like to check, is it possible to create a dynamic calc account to calculate for only 1 plan type in a multi-plan type application? Is there any special setting that I need to do to enable this? I already selected source plan type as Plan type 1 for my dynamic calc account. Please help!
    Many thanks!!
    My HP application is on version 11.1.2.1.

    Hi Jake,
    Thanks for pointing out the check box. Overlooked it and the checkbox was not unchecked, even I only wanted the account to exist in 1 of the plan type.
    However, after I unchecked and refresh now, when I run the calc script, it still trigger process at the back to the other 2 plan types with "Process local xref/xwrite request" request. What else could I have missed?
    I already added the "HSP_Nolink" UDA to all accounts in plan type 2 and plan type 3 and confirmed that there's no account with "Xref" member formula, I really don't know why it is trying to process local xref request. Can anyone help??
    Many thanks!!!

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • How to create dynamic screen using module pool programming

    Hi,
    Could anybody help me how to create dynamic screens?
    I am developing a screen with HR Person with assignment info. If PERNR have multiple assignments, i need to show all the details one by one. How to show the details on screen. I need to call one by one assignment information dynamically.
    Please suggest me how to do, apart from using table controls.
    Thanks,
    Kamal

    You may have the below options:
    1) Table Control
    2) Individual fields
    3) ALV
    4) pop-up screen

  • How to create dynamic window in smartform

    <i>HI Floks</i>
    my requirement is invoice smartform having few line items .i can print this line items with different categories with dynamically placed in smartfom. there how many items with in particular category print its self . how is it possible to printing .is it possible to print dynamic fields and window without changing driver program and structure .How to create dynamic window.
    any body knows reply me fast
    thanks in advance ,
    suresh

    Hi suresh,
        You can create all the windows, but if you go to specific window you will see different tabs like general attributes, output options and conditions. In that conditions tab, you can give condition. so based on that condition, that window will be printed.
    Dont forget to reward points if helpful.
    regards,
    Chandra.

  • How to create dynamic variable in HANA

    Hello experts,
    Please help me on how to create dynamic variable in calculation view.
    Ex:  variable automatically should take YTD, or MTD values so that I can directly consume column in BW on hana or BO reporting.

    Hi ,
    Not sure on what are looking for. Have a look on the below blog once, if this is what you are looking out for:
    Applying YTD in SAP HANA with SAP BO Analysis Office
    Regards,
    Krishna Tangudu

  • How to create Dynamic Webi 3.1 filename in Publication

    I have a webi 3.1 report that is being called from a publication used for bursting using the eFashion universe.  I want the file name to be dynamic, based on the profile.  Within the webi report I created a free standing cell that I set to "Western States" or "Eastern States" based on the states in the report at the time of the run (set by the profile).  This works correctly.  But there does not seem to be a way to get the report to use the free standing cell value as part of the report name.  From the publication, properties, destinations, use specific name I can only pick title and document name.  Neither of these is the free standing cell in the report.  I saw that version 4.0 has this ability but I can't upgrade for another year and deski is not an option.  Any suggestions?  Thank you.

    I figured out how to create dynamic report names with 2 fields within the Publication tool.  I padded fullname and  email in dynamic recipients to be the two fields I wanted from the report.  Then in Destinations, File Name:, Use specific name I picked userfullname and email address to create the report name.   But that would not work if I actually needed to use the email address to send the report to.  We don't have Java programmers and may have to find other options.  Thanks.

Maybe you are looking for

  • Backing up iTunes Library to New External Hard Drive

    I need to move the location of my itunes library as my external hard drive has become full. I have been backing up my "computer" (i.e. internal hard drive) and the itunes library stored on the external hard drive with TM. Once I move the library, I w

  • How to delete the VSL config on 4507 switch pair

    I have a 4507 switch pair I've been using in the lab and now need to return them to factory defaults. I can't seem to get rid of the VSL portion of the config though.  The pair is no longer connected and I'm working from the serial console. I have 'e

  • Watching purchases ITunes movies on a TV

    I bought the AV cable and connected my IPOD to my TV according to these instructions. I am receiving audio, yet no video, any idea what's wrong? Method 1 setup (Composite video) This method can be used when the supported iPod is either in or out of t

  • Do not want Quicktime to load automatically

    I have searched the forum for my answer with no luck. I am a Cinematographer, I am putting together my showreel. The reel consists of between 8 or 10 QuickTimes, each between 5 to 8 MB in size. When the page loads all the quicktimes load. That is a b

  • Restarting DRF Services

    I just wanted to verify before I did it, that I can restart the DRF services on my CUCM 7.0 without disrupting anything but backups right? A job seems to be hanging and I can't configure anything because it says that a backup is in progress, even tho