Variable Substitution not working correctly?!

Hello all,
perhaps some of you faced the same problem. It depends on the variable substitution in XI (PI).
We have got an IDOC - FILE szenario. As far everything is working fine. The XML is created correctly.
Now we want to get two fields from the payload to use both in our receiver file adapter as filename.
The IDOC is a standard ORDRSP.ORDERS05.
(1) The first field is the "job number" and located in the IDOC element: E1EDK01
(2) The second field ist the "purchase order number" and located in the IDOC element: E1EDK02
The fields are both named BELNR (and here seems to be a problem).
To use the variable substitution we did as it is described in help.sap.com and used the following path to get the variables from the payload:
(1) variable name: aufnr  ;  reference: payload:ORDERS05,1,IDOC,1,E1EDK01,1,BELNR,1
(2) variable name: bstnr  ;  reference: payload:ORDERS05,1,IDOC,1,E1EDK02,1,BELNR,1
these two variables "aufnr" and "bstnr" we want to use in our filenameschema. So we wrote the following for the schema:
Ordrsp_%aufnr%_%bstnr%.xml
The effect is that both variables always contain the same value, the value of "bstnr".
Strange is that, if we delete one substitution i.e. (2) "aufnr" contains the correct payload value. It seems he overwrites the value of "aufnr" with the value of "bstnr" because of the same name in the IDOC structure (BELNR).
Has anyone any idea what to do?
Many thanks and kind regards,
Steven
PS: Of course points will be rewarded for helpfull answers. :o)

Thank you for your answers!
But there are several Problems using a dummy field in an IDOC structure. We have got a naming convension so that we can't create an IDOC-like structure named ORDRSP.ORDERS05.
But perhaps I am thinking to complex and there is an easier way to add a dummy field to an IDOC structure.
Could you perhaps also suggest a solution for that dummy field problem?
Many thanks and kind regards,
Steven

Similar Messages

  • Customer Ext Variable is NOT working correctly in the Restricted Key Figure

    Hi all,
       I have created a variable ZVCBLMTH (Period from 01/1996 to Last Month) with reference to
        0CALMONTH  and it will be populated through  Customer Exit and it works fine.
        In the selection for 0CALMONTH, I gave the range as '05/2008' to '08/2008' and this new
        variable  passed the value of  range as '01/1996' to '04/2008' in RSRT.
        The properties of the variable are:
              Type of Variable -  Characteristic, Processing by - Customer Exit, Variable Represents - Interval
              and Variable is - Optional.
              No change in the result after changing the 'Variable is' from Optional to 'Mandatory'.
      This variable is used in Restricted Key Figure to calculate the number of matching records between
       01/1996 & 04/2008 and somehow it is not recognizing this variable and NOT passing the results correctly.
       But, there are records with 0CALMONTH between 01/1996 & 04/2008.   
       How could I test that which value is passed into the Restricted Key Figure for this variable, PLEASE ?
       Thanks in advance.
    Regards,
    Venkat.

    Hi Clemens Li
    I agreed on your point. When we define the Internal table the type for element EQUNR & QUMNR , we are referring the SAP data element for EQUNR, QMNUM field.
    Our doubt is even though we refer the standard data element, in the ALV display, it shows with leading zeros and also it creates problems in the filtering and in the filter window all values instead of unique nos.
    Hi Abhii
    I have given below the fieldcat coding.
    Friends, can you kindly clarify the above said problems. Since we use SAP ECC 6.0 any notes or patches apply is required. ( this is the basic functionality in ALV, that is my doubt).
        wls_fieldcat-col_pos   = wpv_pos.
        wls_fieldcat-fieldname = wpv_champ.
        wls_fieldcat-tabname   = wlc_tabname.
      wls_fieldcat-seltext_s = wls_fieldcat-seltext_m
        wls_fieldcat-seltext_l = wpv_libelle.
        wls_fieldcat-ddictxt   = 'L'.
        wls_fieldcat-no_out    = wv_no_out.
        APPEND wls_fieldcat TO gt_fieldcat.
    Kind regards,
    Jegathees P.

  • Variable Substitution not working when using ABAP mapping

    Hi all,
    I am doing an IDoc to File scenario.
    Due to some complex mapping requirements, i had to use ABAP mapping for IDoc to File ( IDoc : SHPMNT05)
    There is also one more requirement where in i need to generate the receiver filename dynamically
    i.e the filename is of the form :     
        GW-XYZ-DD/MM/YYYY.csv
    Where
    XYZ is the Shipment number (E1EDT20- TKNUM)
    DD/MM/YYYY is the IDOC creation date in ECC (EDIDC-CREDAT)
    so i used the variable substitution option in receiver file adapter.
    But its not working.
    Is there any limitation for using the variable Substitution, doesnt variable substitution work in case of ABAP mapping?
    Regards,
    Loveena.

    Hi,
      u written ABAP mapping program to get the file name in the required format ,
    is it rt?
    when u test it at message mapping(including ABAP map program)
    u get the the required format of file name in the one of target filed.
    if that was fine, please check the variable substituiton parameters at receiver file adapter.
    i mean, are u maintain variable name and refernece.
    u have to specify the payload information.
    warm regards
    mahesh.

  • Security filter with variable does not work correctly

    Helo,
    I have one table with this columns (called BI_USERS):
    USERBI | REGIONS
    XXXX 10,5 -> In this case the user XXX can access the region 10 and 5
    AAA 9,7
    I use this table to apply the security filters. Fisrt I did a initialization block with the select: SELECT USERBI, REGIONS FROM BI_USERS WHERE USER = :USER
    This select populate two variables: variable USER (system variable) and UserRegion (Non-system variable)
    After I use the UserRegion variable in the securty filter of the one group of users. For exemple:
    Name | Status | Business Model Filter
    "Claro"."Historico Saldo Pre-Pago" Enabled "Claro"."Historico Saldo Pre-Pago"."DW_UN_NEG" In(VALUEOF(NQ_SESSION.*UserRegional)* )
    But the issue is that the query is not working, because the query created for BIServer no use the IN operator. Seems the IN operator is changed for equal (=).
    And the query returs error because the value 10,5 (for example) is not a numeric value.
    Anybody could help me, please? I am using the version 10.1.3
    Mauricio

    |||\/||| wrote:
    Helo,
    I have one table with this columns (called BI_USERS):
    USERBI | REGIONS
    XXXX 10,5 -> In this case the user XXX can access the region 10 and 5
    AAA 9,7
    I use this table to apply the security filters. Fisrt I did a initialization block with the select: SELECT USERBI, REGIONS FROM BI_USERS WHERE USER = :USER
    This select populate two variables: variable USER (system variable) and UserRegion (Non-system variable)
    After I use the UserRegion variable in the securty filter of the one group of users. For exemple:
    Name | Status | Business Model Filter
    "Claro"."Historico Saldo Pre-Pago" Enabled "Claro"."Historico Saldo Pre-Pago"."DW_UN_NEG" In(VALUEOF(NQ_SESSION.*UserRegional)* )
    But the issue is that the query is not working, because the query created for BIServer no use the IN operator. Seems the IN operator is changed for equal (=).
    And the query returs error because the value 10,5 (for example) is not a numeric value.
    Anybody could help me, please? I am using the version 10.1.3
    MauricioHi Mauricio,
    First of all you have some syntax errors with your init block:
    select USERBI, REGIONS from BI_USERS WHERE upper(USER)=upper(':USER');
    Couple things to consider here:
    1) Why are you selecting Userbi column from the table? Is USER system session variable not getting populated through other souces like LDAP or default security?
    Ans: If your user session variable is getting populated from a different init block, then you dont need to select that column. Then your init block would look something like this:
    select 'USERREGIONAL', REGIONS from BI_USERS WHERE upper(USER)=upper(':USER'); - Data Source
    Row Wise Initialization - Data Target
    Initblock that is populating the user session variable as the order of precedence.
    2) If you dont have USER session variable populating from any other source, then your init block would look something like below:
    select 'USER', USERBI, "USERREGIONAL', REGIONS from BI_USERS; - Data source
    Row Wise Initialization - Data target
    After following one of the above two steps, you need to apply the filters on the table.
    "Claro"."Historico Saldo Pre-Pago"."DW_UN_NEG" IN(VALUEOF(NQ_SESSION.USERREGIONAL))
    Note: Make sure you understand that variables are case sensitive.
    Please award points as this is correct answer.
    Thanks,
    -Amith.
    Edited by: Amith on May 10, 2011 3:18 PM

  • Variable substitution not working for dynamic file name in Receiver File CC

    Hi Experts,
    I am doing the scenario of Proxy sender to File receiver and my purpose is to Create the text file
    as per the filename available in Source Message payload.
    I am using the Variable Substitution method for this as shown below.
    Source Message Structure:-
         <Row>            -
    having Cocurence 1.1
             <Filename>     -
    having Cocurence 1.1
             <Item>            -
    having Cocurence 1.Unbounded
              <Field1>
              <field2>
             <Item>
             <Item>
              <Field1>
              <field2>
                <Item>        
         <Row>
    Target structure is same as the source structure and i have mapped the Filename field of the Source
    with the Target structure Filename.
    In ID the following is the File receiver CC Configuration.
    File Name Scheme:- %Dyn_filename%
    In Advance tab, I have selected the Enable option and added one row as Variable name %Dyn_filename%
    and Reference as payload:Row,1,Filename,1
    In testing I am getting the Error as 'variable Dyn_filename is not found in Message payload'.
    Please suggest me.
    Regards,
    Jagesh

    Hi Pooja,
    Hi Pooja,
    Thanks for your valuable reply..
    I  tried with the same. but still Filename is appearing in Output file.Giving you some details regarding my Receiver File Configuration settings.
    Target Message Type:-
              <MT_Target_Struct>
                    <Row>----
    1.1 occurence
                            <Filename_test>----
    1.1 occurence
                            <ITEM>----
    1.unbounded occurence
                                  <Field1>
                                  <Field2>
                            <ITEM>
                            <ITEM>
                                  <Field1>
                                  <Field2>
                            <ITEM>
                    <Row>
              <MT_Target_Struct>
    Recordset structure:-  Row,Filename_test,ITEM
    Row.fieldSeparator----
    >'nl'
    Filename_test.fieldFixedLengths----
    >0  (Zero)
    Filename_test.fixedLengthTooShortHandling----
    >Cut
    ITEM.fieldSeparator----
    >,
    ITEM.endSeparator----
    >'nl'
    I want only ITEM node to be written in the output file.
    Please suggest.
    Regards,
    Jagesh

  • Variable substitution not working properly

    Hi,
    I am using variable substitution method for creating receiver file name but file is being created with a different name,not as expected .
    what may be the reason for this .??
    Thanks ,
    rohit

    Hi,
    It may help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/106d42ab7fd142e10000000a1550b0/content.htm
    Thanks,
    Vijaya.

  • Flex Time with variable tempo not working correctly.

    Hey,
    Has anyone else noticed that Flex Time doesn't work as intended if you have variable tempo?
    To clarify, I recorded a band playing their song and then figured out their various natural tempo changes and adjusted the Global Tempo Track accordingly.
    Then, the drummer recorded his part to a click on that track, obviously keeping with the natural tempo changes that the band played to.
    Quantization of MIDI works just fine, as in, it matches the increases and decreases in tempo.
    However, attempting to quantize an audio track using Flex Time does not work properly.
    I was just wondering if there is something that I'm doing wrong or if this is a known bug.
    Thanks,
    William

    Thank you for your answers!
    But there are several Problems using a dummy field in an IDOC structure. We have got a naming convension so that we can't create an IDOC-like structure named ORDRSP.ORDERS05.
    But perhaps I am thinking to complex and there is an easier way to add a dummy field to an IDOC structure.
    Could you perhaps also suggest a solution for that dummy field problem?
    Many thanks and kind regards,
    Steven

  • Symbol and Text Substitution not working correctly

    Hello,
    in „Language & Text“ I have the following symbol and text substitutions enabled, which aren’t working in Pages version 5.1.1 (iMac 2011, Yosemite 10.10.1):
    „- - >“ (written without blank space between the characters) which should be substituted to „➜“.
    In Safari this works, but in Pages it isn’t working.
    Other substitutions work in Pages, for example:
    „! ! s s“ (written without blank space between characters) is substituted to „ẞ“ in Safari and Pages.
    Can somebody help me?

    In Pages v5.5.1 and Yosemite 10.10.1, I can reproduce the injected space issue resulting from your Keyboard > Text substitution for „-->” to „→” . Even if you remove one of the '-', Pages will still insert the space before the right arrow in the result. This is a bug.
    Fix: „..>” will produce the arrow without the injected space.

  • Variable Substitution not working for multiple files

    Hi,
    Have a scenario in which we are using Interface Collection with multiple files as output.
    The naming of the files is derived from a payload field as follows.
    payload:MT_OrdersAck,1,Order,1,File_Header,1,StoreNo,1
    When the first file is generated this works fine, but fails for the rest of the files.
    I guess this is because of the hardcoding 1 in 
    payload:MT_OrdersAck,1,Order,1,File_Header,1,StoreNo,1
    how do we get around this problem?
    Any Ideas?

    Hi, I suppose you are using Mapping-Based Message Split, right? Do the following files look the same like the first file with respect to File_Header?
    Make sure that the payload structure (payload:MT_OrdersAck,1,Order,1,File_Header,1,StoreNo,1) is equal in all files and that first occurrence of StoreNo always has a value in all the files.
    Regards, Martin

  • Substitution rule is not working correctly

    Hi PS Gurus,
    We have a problem in one of the newly created projects that the substitution rule is not working correctly; the data is not copied to the WBS element Cust. Enhancement tab.
    Project 1 is working fine and the data is copied & Project 2 and Project 3 are not getting all the data copied to the WBS element,
    In that project profile (substitution rule is given), substitution rule is also maintained 
    So please help why in one project substitution rule in working & other isnu2019t.
    Many Thanks in Advance.
    MM

    Hello Menaka,
    Select the WBS element in the project builder.
    Cleck on Edit --> Validation Substitution --> Substitution
    You will get the list of Substituitions, Double click on the required Substition rule.This action will generate a log, whether substitution has been succesfully caried out or with some error.
    Kindly provide us that error log to guide you further.
    Regards
    Ravi

  • Program not working correctly-Help!

    class Sort
         /* method takes an array of integers as an input,
         * and returns a copy with the element values sorted
         * by select method.
         int[] selectSort(int[] input)
              /*declare variables to be used in array */
              int x, y, max, temp;
              int[] select = new int[input.length];
              /*This loop reads the entire array */
              for(x = input.length - 1; x>0; x--)
                   max = 0;
                   /*This loop checks to see if any number is
                   lower possible greatest number /
                   for(y = 0; y <= x; y++)
                   {//Returns number if lowest number
                        if(input[y] > input[max])
                             max = y;
                        }//end of if statement
                   }//end of inner loop
                   /*Switches the values */
                        temp = input[x];
                        select[x] = input[max];
                        select[max] = temp;
              }//end of outer loop
              return select;          
         } //end of selectSort()
         /* method takes an array of integers as an input,
         * and returns a copy with the element values sorted
         * by bubble method.
         int[] bubbleSort(int[] input)
              int[] bubble = new int[input.length];
              for (int x = 1; x < input.length; x++)
                   for (int y = 0; y < input.length - 1; y++)
                        if (input[y] > input[y+1])
                             int temp = input[y];
                             bubble[y] = input[y+1];
                             bubble[y+1] = temp;
              return bubble;
         } //end of bubbleSort
    **********************Test Class**********************
    class TestSort
         public static void main(String[] args)
              /* count variable used as loop counter when
              * result table display is generated
              int count;
              /* variable for object of class Sort */
              Sort x;
              /* create object of class GroupEx2 */
              x = new Sort();
              /* create a source array of integer elements */
    int[] y = new int[5];
    /* assign values to array elements to be sorted     */     
              y[0] = 8;
              y[1] = 5;
              y[2] = 3;
              y[3] = 9;
              y[4] = 1;
              /* create variable for target of select sort array */
              int[] ss;
              /* create variable for target bubble sort array */
              int[] bs;
              /* call method to return an array with element values select sorted*/
              ss = x.selectSort(y);
              /* call method to return an array with element values bubble sorted*/
              bs = x.bubbleSort(y);          
              /* display original and sorted arrays in three columns*/
              System.out.print("Input Array" + "\t");
              System.out.print("Select Sort" + "\t");
              System.out.println("Bubble Sort");
              for (count = 0; count < y.length; count++)
                   /* Column 1: original array */
                   System.out.print("input[" + count + "] = " + y[count]);
                   /* tab between columns 1 and 2 */
                   System.out.print("\t");
                   /* Column 2: select sorted array */
                   System.out.print("select[" + count + "] = " + ss[count]);
                   /* tab between columns */
                   System.out.print("\t");
                   /* Column 3: bubble sorted array */
                   System.out.println("bubble[" + count + "] = " + bs[count]);
              } // end of display for loop
         } // end of main()
    } // end of class TestSort

    Thanks for the Bash! I'm surprised you had the time
    for it.Go back and look at your original post. A whole bunch of code, and the only description of the problem is "not working correctly." Do you honestly think that's a reasonable way to ask for help? Do you go to the doctor and say, "I'm sick" and then just wait for him to cure you? Do you take your care to the mechanic and say only, "It's broke"?
    Look, this is your problem and it's your responsibility to fix it. There are people here who are happy to help you, but it's up to you to provide a reasonable statement of what's wrong, what you've tried, what you don't understand. For instance:
    Does it compile? If not, post the complete error message.
    Does it run, but throw an exception? If so, post the stack trace.
    Does it not throw an exception, but not behave the way you expect? Then describe the expected beavior and the observed behavior.
    Do you really need to be told this stuff? It seems like common sense that when you're asking people to spend their time helping you, you should give them the information they need to be able to do so.

  • XSLT not working correctly in BPEL

    Hi,
    We are using XSLT to remove namespaces from our XSL. When testing this XSL in Jdeveloper, it works fine. But when we using it in BPEL, the transformation is not working correctly.
    Please find below the XSL content
    +<xsl:stylesheet version="1.0"+
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"                xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"+
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    exclude-result-prefixes="xsl xref xp20 bpws ora ehdr orcl ids hwf">
    +<xsl:template match="comment()|processing-instruction()|/">+
    +<xsl:copy>+
    +<xsl:apply-templates/>+
    +</xsl:copy>+
    +</xsl:template>+
    +<xsl:template match="*">+
    +<xsl:element name="{local-name()}">+
    +<xsl:apply-templates select="@* | node()"/>+
    +</xsl:element>+
    +</xsl:template>+
    +<xsl:template match="@*">+
              +<xsl:choose>+
                   +<xsl:when test="name() != 'xmlns'">+
                        +<xsl:attribute name="{local-name()}">+
                             +<xsl:value-of select="."/>+
                        +</xsl:attribute>+
                   +</xsl:when>+
              +</xsl:choose>+
    +</xsl:template>+
    +</xsl:stylesheet>+
    The BPEL code of the transform is:
    +<assign name="Transform_1">+
    +<bpelx:annotation>+
    +<bpelx:pattern>transformation</bpelx:pattern>+
    +</bpelx:annotation>+
    +<copy>+
    +<from expression="ora:processXSLT('Transformation_1.xsl',bpws:getVariableData('inputVariable','payload'))"/>+
    +<to variable="TempVar" part="payload" query="/ns1:mthReplacement_input"/>+
    +</copy>+
    +</assign>+
    Not sure why the transformation isnt working in BPEL. Has anyone faced similar issues? Please share your experiences.
    Thanks
    John

    Hi John ,
    We have tried this instead of writing new code in the xslt , pls do the following
    1.Open the xslt in jdev.
    2.Remove the attribute exclude-result-prefixes for the element xsl:stylesheet.
    3.Your new XSLT file should look like below,
    <xsl:stylesheet version="1.0"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    +xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    >
    ....business logic...
    </xsl:stylesheet>
    4.Compile and deploy your BPEL Process.
    5.You should not see any namespaces in the BPEL Console now for this xslt.
    Thank you.
    Regards
    Venkat.

  • Sorting not working correctly for date field in alv report

    Hi All,
    My report displays many rows also containing date type fields of bldat,budat .
    When I sort the report selecting field of type bldat budat the sorting is not correct for the year.
    Ex:
    Invoice doc dat
    01-25-2011
    01-21-2011
    02-02-2011
    10-25-2010
    11-20-2010
    If I use ascending then it is sorted as :
    Invoice doc dat
    01-21-2011
    01-25-2011
    02-02-2011
    10-20-2010
    10-25-2010
    Why the sorting is not working correct for year.(2010 records should have been first).
    The field wa_tab-bldat is of type char10.
    It is populated as wa_tab-bldat = bsak-bldat.
    Kindly suggest what can be done.

    The field wa_tab-bldat is of type char10
    Then what it does is correct.
    Refer to type datum...it will work

  • If statement within a view is not working correctly ?

    Hi all,
    maybe i am wrong but i think the if statement within a view is not working correctly. See code down below.
    I would like to use the Hallo World depending on the page attribute isFrame with or without all the neccessary html tags. Therefore i have embedded the htmlb tags in an if statement. But for any reason if isframe is initial it isn't working. It would be great if anybody could help me.
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if not isframe is initial. %>
      <htmlb:content design="design2003">
         <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    hallo world
    <% if not isframe is initial. %>
         </htmlb:page>
      </htmlb:content>
    <% endif. %>
    thanks in advance and best regards
    Matthias Hlubek

    Matthias,
    The short answer: your example is <b>NOT</b> going to work. The long answer will probably 5 pages to describe. So first let me rewrite the example so that it could work, and then give a short version of the long answer. Do not be disappointed if it is not totally clear. It is rather complicated. (See the nice form of IF statements that are possible since 620.)
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if isframe is <b>NOT</b> initial. %>
    <htmlb:content design="design2003">
      <htmlb:page title = "Top Level Navigation view">
        hallo world
      </htmlb:page>
    </htmlb:content>
    <% else. %>
      hallo world
    <% endif. %>
    So why does your example not work? Let us start with a simple tag:
      <htmlb:page title = "Top Level Navigation view">
      </htmlb:page>
    Now, for each tag, we have effectively the opening part (<htmlb:page>), an optional body, and then the closing part (</htmlb:page>). We are now at the level of the BSP runtime processing one tag. What the runtime does not know, is whether the tag wants to process its body or not. Each tag can decide dynamically at runtime whether the body should be processed. So the BSP compiler generates the following code:
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
      ENDIF.
      tag->DO_AT_END( ).
    You should actually just debug your BSP code at ABAP level, and then you will immediately see all of this. Now, let us mix in your example with our code generation. First you simplified example:
    <% if isframe is NOT initial. %>
      <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    <% if isframe is NOT initial. %>
      </htmlb:page>
    <% endif. %>
    And then with our generated code. Look specifically at how the IF/ENDIF blocks suddenly match!
    if isframe is NOT initial.
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
    endif.
    if isframe is NOT initial.
      ENDIF.
      tag->DO_AT_END( ).
    endif.
    You can see that your ENDIF statements are closing IF blocks generated by the BSP compiler. Such a nesting will not work. This is a very short form of the problem, there are a number of variations, and different types of the same problem.
    The only way to solve this problem, is probably to put the body into a page fragment and include it like I did above with the duplicate HelloWorld strings. But this duplicates source code. Better is to put body onto a view, that can be processed as required.
    brian

  • ** Filtering is not working correctly in ALV (REUSE_ALV_GRID_DISPLAY)

    Hi Friends,
    We have one Z report that output is displayed in ALV. We are using the standard FM 'REUSE_ALV_GRID_DISPLAY. 
    We have requirement to remove leading zeros for the field like Material Number (MATNR), Equipment Number (EQUNR) etc. We did the changes by applying the field catalog properties as below.
    lw_fieldcat-lzero = space.
    lw_fieldcat-no_zero = 'X'.
    After this, the MATNR and EQUNR is displayed correctly in the ALV. (Leading zeros are suppressed). But, when we do filter for these fields, in the filter window it displays all the values with leading zeros.
    1. We don't understand why it is showing in the Filter widow with all leading zeros. All it shows all the records instead of unique items.
    Later on, we removed the above fieldcat coding. Then, we have called the CONVERSION_EXIT routines (in the domain) for the fields to remove leading zeros.
    Now, the MATNR and EQUNR is displayed correctly (without leading zeros) in ALV. When we do filter, it is also doing filtering correctly. But, when we do filter which have EQUNR having long values (after zero suppression), it is not working correctly. i.e no items are displayed in the ALV.
    Not only for this items. If we filter character columns which have long text, it is not filtering correctly.
    2. It is not able to understand why the filtering is not working for long items. But in the standard report, the filtering is working correctly.
    We are using SAP ECC 6.0.
    Friends, can you clarify the about doubts. It is surprising for me.
    Kind regards,
    Jegathees P.
    Our customer is asked to remove the leading zeros for the numeric field

    Hi Clemens Li
    I agreed on your point. When we define the Internal table the type for element EQUNR & QUMNR , we are referring the SAP data element for EQUNR, QMNUM field.
    Our doubt is even though we refer the standard data element, in the ALV display, it shows with leading zeros and also it creates problems in the filtering and in the filter window all values instead of unique nos.
    Hi Abhii
    I have given below the fieldcat coding.
    Friends, can you kindly clarify the above said problems. Since we use SAP ECC 6.0 any notes or patches apply is required. ( this is the basic functionality in ALV, that is my doubt).
        wls_fieldcat-col_pos   = wpv_pos.
        wls_fieldcat-fieldname = wpv_champ.
        wls_fieldcat-tabname   = wlc_tabname.
      wls_fieldcat-seltext_s = wls_fieldcat-seltext_m
        wls_fieldcat-seltext_l = wpv_libelle.
        wls_fieldcat-ddictxt   = 'L'.
        wls_fieldcat-no_out    = wv_no_out.
        APPEND wls_fieldcat TO gt_fieldcat.
    Kind regards,
    Jegathees P.

Maybe you are looking for