Use the value of a field as column-name of a dynamic table

Hi All
I have the following situation:
a) Internal table TB_ORDER_CONDITION ==>  data: tb_order_condition type standard table of bapicond.
     sample of the internal table TB_ORDER_CONDITION:
CONT_TYPE # CONDVALUE# CONDBASEVAL  
    ZR00         #    38.800000#  1.000000
    ZR30         #    2.800000  #  0.000000
    SKTO        #    0.000000  #  57.8500000
b) dynamic-table  <L_TABLE_II> has the following columns:
ZR00#ZR30#ICM3#IPS2  SKTO  
c) I would like to move as below:
ZR00#ZR30# ICM3#IPS2# SKTO 
38.800000#2.800000#57.8500000
Observation:
I used this symbol just to show the separationfrom one column from another.
Items a) and b) are OK. The problem is that I don't know how to make this move as showed in item c).
Could you please advise?
Thanks in advance.
Gaia

Hello,
Check the code snippet below:
FIELD-SYMBOLS: <wa_order_creation>  TYPE bapicond,
               <l_table_ii>         TYPE STANDARD TABLE,
               <l_wa_ii>            TYPE ANY,
               <l_fieldval>         TYPE ANY.
SORT tb_order_condition BY itm_number. "Sort by Item Number
LOOP AT tb_order_condition ASSIGNING <wa_order_creation>.
* Add a record to the dynamic table for each item
  AT NEW itm_number.
    APPEND INITIAL LINE TO <l_table_ii> ASSIGNING <l_wa_ii>.
  ENDAT.
  ASSIGN COMPONENT <wa_order_creation>-cond_type
  OF STRUCTURE <l_wa_ii> TO <l_fieldval>.
  IF sy-subrc = 0.
    <l_fieldval> = <wa_order_creation>-cond_value.
  ENDIF.
ENDLOOP.
BR,
Suhas

Similar Messages

  • Need to create a dynamic caption(column name) in a dynamic table

    Hi All,
    I have created dynamic table .But the dynamic column is not showing.I have created two column name that is name and empId .I have tried with following code
    IWDCaption nameCap=(IWDCaption)view.createElement(IWDCaption.class,"nameCap");
    nameCap.setText("Name");
    tabColumn1.setHeader((IWDCaption)nameCap);
    IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");
    addCap.setText("Address");
    tabColumn2.setHeader((IWDCaption)addCap);
    I m getting internal server error...But When i  m comented the above code i can able to see tha dynamic table withput column name..Can anyone help me
    Suman

    Hi
    IWDTableColumn tabColumn1 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"N_Co");
              IWDTableColumn tabColumn2 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"A_Co");
              IWDInputField nameText = (IWDInputField)view.createElement(IWDInputField.class,"N_Text");
              nameText.bindValue(attrib1);
              tabColumn1.setTableCellEditor((IWDTableCellEditor)nameText);
              IWDInputField addText = (IWDInputField)view.createElement(IWDInputField.class,"A_Text");
              addText.bindValue(attrib2);
              tabColumn2.setTableCellEditor((IWDTableCellEditor)addText);
    <b>I need to see the column name.....</b>
    for that i have written the following code...
    while writting the following code i m getting internal server error
    IWDCaption nameCap = (IWDCaption)view.createElement(IWDCaption.class,"nameCap");
    nameCap.setText("contribution_area");
    tabColumn1.setHeader((IWDCaption)nameCap);
    IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");
    addCap.setText("SUM");
    tabColumn2.setHeader((IWDCaption)addCap);

  • How to Populate a drop down list using the values of a text field?

    Hi,
    I wanted to Populate the items of my drop down list according to the value entered in the textfield above it?
    also the value of list remains consistent in other rows also where i am using the drop down list field.
    Please Try to help me in this query.
    Thanks in Advance!!!
    I am using Javascript in adobe version ES 8.2.

    Part II:
    If you have other items for your droplist(s) that are to appear in addition to the "variable language" entered by a user you can add that to the script.  For example in addition to the Party1 and Party2 name appearing in my droplist I also want the list to have an option for a user to select: The parties jointly.  I add this to the script:
    this.addItem(Party1.rawValue);
    this.addItem(Party2.rawValue);
    this.addItem ("The parties jointly");
    If you have trouble making it work, post a bit of your actual form requirements.

  • How to hide a field based on the value of a field in a different subform - null check doesn't work!

    I'm using Javascript to set the actions. I need to hide a text field if the value of a field in another sub-form is null.
    - tried checking the value of the other field for null - doesn't work
    - tried setting a variable str2 where I know the value of the other field is available then checking that variable when I initialize the text field - doesn't work
    What am I missing?

    Hi.
    Try this in the originating sub form referring to the text field (X). 
    if (this.rawValue = 1)
              X.presence = "visible";
    else if (this.rawValue = null)
              X.presence = "hidden";

  • Need to get the values from "Signed" field from PDF form.

    Hi,
    This is Dinesh. I am PHP Developer. My issue is "I am not able to get the value of "signed" field from the PDF form when the form has been submitted.". I want to get the Digital Signature value of that field and i need to store it in the DB.
    Please help me here Or Please forward this issue to any of the PHP developer who solved this issue and let me know.
    Thanks & Regards
    Dinesh

    Hi Vikas,
    you can use this badi MRM_WT_SPLIT_UPDATE, the method will be WHTAX_SPLIT_UPDATE
    in this badi please see the importing and exporting parameters, you will get the  values of withholding tax code  as TE_RBWS in export parameters.
    Please search in google or SCN you will get how to use it.

  • How to read the value of a field belonging to a different context node in GET_I method during runtime

    I want the read the value of a field,'LCSTATUS' belonging to context node 'BTADMINH' in the GET_I method of the field, 'ZZFLD000008' belonging to context node,'ZBTACTIVITYH'.
    In the context node class of context node 'ZBTACTIVITYH',I have created an instance attribute,GR_OWNER type ref to context class.
    I get the following error in the line - lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ).
    'An exception (CX_CRM_CIC_PARAMETER_ERROR) occurred Message no. TPDA430'
    I have used the below code.
    method GET_I_ZZFLD000008.
         DATA: current TYPE REF TO if_bol_bo_property_access,
               lv_act_status TYPE string.
         DATA:lr_entity TYPE REF TO cl_crm_bol_entity,
               lr_current TYPE REF TO if_bol_bo_property_access,
              lr_parent TYPE REF TO cl_crm_bol_entity.
         rv_disabled = 'TRUE'.
         if iterator is bound.
           current = iterator->get_current( ).
         else.
           current = collection_wrapper->get_current( ).
         endif.
    CHECK gr_owner IS BOUND.
    lr_entity ?= gr_owner->btadminh->collection_wrapper->get_current( ).
    CHECK  lr_entity  IS BOUND.
    lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ). "error states that lcstatus can't be used here.
       TRY.
             IF current->is_property_readonly(
                           'ZZFLD000008' ) = abap_false. "#EC NOTEXT
               rv_disabled = 'FALSE'.
             ENDIF.
         CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
               cx_crm_genil_model_error.
           RETURN.
       ENDTRY.
    endmethod.

    Hi,
    LCSTATUS is not an attribute of the BTADMINH structure. It is read using the relation to the status object
    BTADMINH-> BTHeaderStatusSet-> BTStatusHCurrent-> ACT_STATUS.
    Try reading the ACT_STATUS of object BTStatus as given below.
            data: coll   type ref to if_bol_entity_col.
           data: entity type ref to cl_crm_bol_entity,
                         lv_act_status TYPE string.
           entity ?= current.                                                               "BTADMINH entity.
           coll = entity->get_related_entities(
                    iv_relation_name = 'BTHeaderStatusSet' ).    "#EC NOTEXT
           current = coll->get_current( ).
            entity ?= current.
           coll = entity->get_related_entities(
                    iv_relation_name = 'BTStatusHCurrent' ).     "#EC NOTEXT
           current = coll->get_current( ).
            try.
           lv_act_status = current->if_bol_bo_property_access~GET_PROPERTY_AS_STRING(  'ACT_STATUS' ).
             catch cx_crm_cic_parameter_error.
           endtry.
    Regards JP

  • How do I get the value of a field object programatically after loading a report

    I'm using CR 11.5 and VS2005 in a console application, there is no GUI. I have a report with a page header that has 3 field objects. These field objects, their values change for every record and I want to be able to capture the value of these field objects in code for further processing outside of CR. Is this possible?
    Thanks in advance!
    I should explain a little more, the information I'm trying to obtain is in the Page Header section of the main report. There are subreports. Basically what I'm trying to put together is a list of how many pages are part of each record, the number of pages fluctuates per records so I need to be able to cycle through. Any other suggestions?

    When accessing the fields on the report through the SDK you will only get what database field they are using for data.  The internal data collection that is used by the report can be gathered using the rowsetcontroller from the ReportClientDocument.

  • Holding the value in screen-field

    Dear All,
    I m facing the problem ,while i m putting the value in screen-field and then pressing enter,
    value in that screen-field is becoming null automatically.
    wht shld i do for holding the value even after PAI.
    Thanks in advance.

    Hi,
    You should define a corresponding variable for that screen field in your program.
    data: my_input_field type ... "same name and type as the one used in screen for field
    so when you enter data to that field and press ENTER, the data will be transported to that variable and in PAI you have its value there.
    Regards
    Marcin

  • How to know where the value of a field in an IDoc is saved?

    Hello SAPients!
    I'm working in ECC 6.0. I have an Inbound Idoc of type WPUBON01. In the segment E1WPB01it has a field named BONNUMMER. My question is: How can I know what TABLE-FIELD is being populated with the value of that field? I mean, is there a way to know the mapping of the fields of an IDoc?
    Thank you in advance for your kind help.

    Hi,
    The table name is WPLST
    I did the following..
    Go to the segement structure in SE12..
    Double click on the data element for that corresponding field..
    Then put a where used-list for that data element...To search in tables..
    I got the table WPLST.
    Thanks,
    Naren

  • How to access the value of a field of a field symbol.

    Hello All,
    i need to access the value of a field in a field symbol. But when i am trying to get the value like <FS>-POSNR, it's showing that that the <FS> has no structure.
    In my program, the field itself that i need to check should be dynamic. ie i'll get the field in a variable and i need to find the value of that field.
    Am pasting my code below, please tell me what needs to be done.
    here in my sample code i am moving the entry of the <FS> into a work area structure. But in my actual program, i gets the structure as a parameter. So is there any way i can declare a work area dynamically...
    FUNCTION z_39181_dyn_fs_60758.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(PARAMETER) TYPE  VBELN
    *"  TABLES
    *"      DATA_TAB
      BREAK-POINT.
      FIELD-SYMBOLS <fs> TYPE ANY.
      FIELD-SYMBOLS <fs1> TYPE ANY.
      FIELD-SYMBOLS <fstab> TYPE ANY TABLE.
      DATA name(5) VALUE 'POSNR'.
      FIELD-SYMBOLS <f> TYPE ANY.
      DATA: dref TYPE REF TO data,
            dref1 TYPE REF TO data,
            dref2 TYPE REF TO data.
      DATA: lv_lips TYPE string.
      DATA: lv_lipsfld TYPE string,
                lv_fld TYPE string,
                lw_lips TYPE lips.
                lv_lips = 'LIPS'.
                lv_fld = 'LW_lips-POSNR'.
      CREATE DATA dref1 TYPE (lv_lips).
      CREATE DATA dref TYPE STANDARD TABLE OF (lv_lips).
      CREATE DATA dref2 LIKE LINE OF data_tab.
      ASSIGN dref->* TO <fstab>.
      ASSIGN dref1->* TO <fs>.
    assign dref2->* to <fs
      <fstab> = data_tab[].
      LOOP AT <fstab> INTO <fs>.
        lw_lips = <fs>.
        WRITE lw_lips-vbeln.
        ASSIGN (lv_fld) TO <fs1>.
       write <fs>
      ENDLOOP.
    Helpful answers will be rewarded...

    Use syntax
    ASSIGN COMPONENT name OF STRUCTURE struc TO <fs>.

  • Can I use the value returned from a Text Function in another Formula?

    I'm writing a report in Hyperion System 9 BI + Financial Reporting Studio version 9.2. I have 2 grids in my report.
    Grid1 Column A is set up as a text function using the function type - <<GetCell("Grid2", 1, a, 1)>>. I would like to use the values returned from this text function in Column A (Grid 1) in a formula in Column B (Grid 1).
    Is it possible to use the values returned in Column A of the text function in another formula? My report does not seem to recognize Column A as numerical values, even though the values to be returned are numerical.
    If so, how do I recognize the values in Column A Grid 1 as numerical values and not text?
    Thanks for any help you can offer!

    Hi Edson,
    Yes you need to use the CALC_ERROR macro function to be able to test whether the last macro function returned an error. CALC_ERROR will return an 'X' if there an error occured during the execution of the last macro function.
    You can use a macro similar to the following:
    IF
      CALC_ERROR( )
      = 'X'
          DO SOMETHING HERE
    ENDIF
    Let me explain how this works internally. The SAP system maintains a global variable g_flg_calc_error during the execution of macros in the planning book. The g_flg_calc_error variable will contain the value of f_calc_error that was set by the last macro function which executed. The ABAP coding of a planning book is something like this:
    data: g_flg_calc_error type /SAPAPO/FLAG.
    * SAP will pass g_flg_calc_error variable to all macro
    * functions. When SAP calls a macro function, it does
    * something like this.
    call function '/SAPAPO/MACRO_FUNCTION_HERE'
            exporting
              plob_values      = i_s_adv_plob_values
              sdp_book         = g_c_advf_sdp_book
              sdp_view         = g_c_advf_sdp_view
            tables
              cols_index       = i_t_cols
              value_tab        = l_t_value_tab
            changing
              f_calc_error     = g_flg_calc_error
    As you can see, the g_flg_calc_error variable
    is passed in the "changing" part of the call. The macro  function being called can then use the f_calc_error
    variable to change the value of the global
    g_flg_calc_error variable. In fact, the macro function being called can also check (by looking at the f_calc_error variable) if the last macro function reported an error.  The CALC_ERROR macro function just checks the value of f_calc_error parameter (w/c in fact is the value of the g_flg_calc_error variable) and returns "true/X" if the f_calc_error was set to true by the last macro function.
    Hope this helps in clearing things out

  • Hi, how can i break the value for a row and column once i have converted the image to the array?????​??

    Hi, I would like to know how can i break the value for a row and column once i have converted the image to the array. I wanted to make some modification on the element of the array at a certain position. how can i do that?
    At the moment (as per attachhment), the value of the new row and column will be inserted by the user. But now, I want to do some coding that will automatically insert the new value of the row and the column ( I will use the formula node for the programming). But the question now, I don't know how to split the row and the column. Is it the value of i in the 'for loop'? I've  tried to link the 'i' to the input of the 'replace subset array icon' , but i'm unable to do it as i got some error.
    Please help me!
    For your information, I'm using LABView 7.0.

    Hi,
    Thanks for your reply.Sorry for the confusion.
    I manage to change the array element by changing the row and column value. But, what i want is to allow the program to change the array element at a specified row and column value, where the new value is generated automatically by the program.
    Atatched is the diagram. I've detailed out the program . you may refer to the comments in the formula node. There are 2 arrays going into the loop. If a >3, then the program will switch to b, where if b =0, then the program will check on the value of the next element which is in the same row with b but in the next column. But if b =45, another set of checking will be done at a dufferent value of row and column.
    I hope that I have made the problem clear. Sorry if it is still confusing.
    Hope you can help me. Thank you!!!!
    Attachments:
    arrayrowncolumn2.JPG ‏64 KB

  • Setting the value of a field based on a dropdown list

    I am using the latest production release of JHeadstart 10.1.3.0.91. I am trying to set the value of a field based on selecting the value of another field (drop down list). The drop down list field has the following attributes set autoSubmit="true" immediate="true" valueChangeListener="#{jhsPageLifecycle.updateModelValue}".
    The other field has the partialtrigger set to the first field. ie "depends on" selection from JHeadStart file. The value of the second field is set in the setter of the VO RowImpl java file.
    The value of that field is only populated on the screen if it is set to disabled="true". This seems a bit bizzare behaviour. Can you explain why it cannot set the value of the field when it is not disabled.

    Worked out that if i set the "Clear/Refresh value" attribute on the field that i want updated then it will work ok
    Alan

  • I am trying to pass the value of a field from the seeded page /oracle/apps/

    I am trying to pass the value of a field from the seeded page /oracle/apps/asn/opportunity/webui/OpptyDetPG. The value I want is in the VO oracle.apps.asn.opportunity.server.OpportunityDetailsVO and the field PartyName.
    I have created a button on the page whose destination URL is
    OA.jsp?OAFunc=XX_CS_SR_QUERY&CustName={#PartyName}
    It opens the correct page, but in the URL it shows this
    http://aa.com:8005/OA_HTML/OA.jsp?OAFunc=XX_CS_SR_QUERY&CustName=&_ti=1897289736&oapc=177&oas=x5E2TIfP1Y0FykBt1ek4ug..
    You can see that &CustName is not getting the proper value. Do I need to do something different?

    You cannot call the form with OA.jsp . This is applicable only for OAF based pages registered as a function.
    For calling a Form, use the below example:
    You have to change the application responsibility key and form function name .
    "form:PN:PN:STANDARD:XXPNTLEASE:QUERY_LEASE_ID={@QueryLeaseNumber}"
    Regards,
    Sudhakar Mani
    http://www.oraclearea51.com

  • Features (pe03) Can wildcard characters be used in Value of Decision Field

    Hi
    When modifying a Feature using transaction PE03. Is it possible to use a wildcard character (ie.. *, ? or +) when defining the "Value of Decision Fields"?
    For example in feature CSTV1
    My tree looks as follows:
    CSTV1 Cost Grouping
    > BAREA Benefit Area
    > CA Canada
    > WERKS Personnel Area
    > CAA*
    > ON
    > CAB*
    > PQ
    > otherwise
    My Personnel Areas are CAA1, CAA2, CAA3, CAA4....etc. Rather than hardcode them I'd like to use a wild card for the last character. In my testing I can't seem to get it to work.
    Any ideas or suggestions?
    Thanks
    Edited by: bluezerby on Jul 31, 2009 6:50 PM

    Dear Blue,
    this is not possible .. as u knw... even in SAP Programs also we cannot use Wild Cards/sysmboles in Identifying Codes...
    Anywhere, u cn use wild cards to search text but not CODE
    Regards
    ...Sadhu

Maybe you are looking for

  • ATI Catalyst 13.1 - Not Good with Photoshop CS6 13.0.1

    I installed Catalyst 13.1 last night. On Windows 7 x64 and Photoshop CS6 13.0.1  I still see the GPU-based color-management issue noted in this thread: http://forums.adobe.com/thread/1093163?tstart=0 Some workarounds:  Configure Photoshop to Basic GP

  • Html:select onchange

    Hi, In html:select tag, i'm using onchange function to submit the page. The problem here is, after selecting a value, if I immediately select another from the combo,it again submits but the page renders with blank page. is there is anyother way to so

  • Can I use SSIS to do this?

    I am new to SSIS and wondering if this is possible and if so can anyone explain to me the data flow that would be necessary. We are currently upgrading our databases. During this process we need to change values of medical lookup values from the firs

  • [solved] nginx chroot jail: open() "/run/nginx.pid" Permission denied

    I used the perl script from the nginx wiki to configure chroot jail and also configured the nginx systemd unit file. When I try to start the service I get # systemctl start nginx Job for nginx.service failed. See 'systemctl status nginx.service' and

  • Using AS values within the same query

    Is this possible. What would the syntax look like? I am trying to use exp24 result in the same procedure like below. Thanks Code: AS SELECT sheet2.id,EmployeeDerivedTable.note, CASE WHEN EmployeeDerivedTable.note IS NOT NULL THEN 'Bob' else 'good' EN