Coverting number formats to internal representation

I need a function module that will convert number format to internal representation. I am writing a program where based on the region that the program is been executed, the number could be 1,000.000 or 1.000,000 or 1 000,000. I need to convert them to internal representation 1000.000 so I can use it for dat manipulation

Hi Megan,
Try this Code..
data: i type i.
data: c(10) type c.
data: p(10) type p decimals 2.
c = '3.520,00'.
catch system-exceptions convt_no_number = 1.
p = c.
endcatch.
if sy-subrc = 1.
clear sy-subrc.
while sy-subrc = 0.
replace ',' with space into c.
endwhile.
clear sy-subrc.
while sy-subrc = 0.
replace '.' with space into c.
endwhile.
condense c no-gaps.
endif.
p = c / 100.
write:/ p.
<REMOVED BY MODERATOR>
Regards,
Goutham.
Edited by: Alvaro Tejada Galindo on Jan 11, 2008 12:31 PM

Similar Messages

  • How to change number format to international setting

    Hello everyone,
    I need some help on how to change the number format on my phone from the standard US format to an international format with no spacing between the numbers. Currently, my numbers appear as: 0706 343 3456. However, I will like for it to appear as 07063433456. When i recieve calls, the number format is not recognised and I cannot tell who is calling. Same goes for SMS messages. In this part of the world, the number format is not spaced, which is quite frustriating.
    Can anyone please advice me on how to go about this.
    Thanks

    Really? I tried that but it did not work. I restarted the iphone several times but the number format did not change.

  • How do I change a number that was international back to UK number so it permanently recognises it as UK not international? I've tried delete, reset factory settings, change the format of the number etc and nothing seems to work. Help!

    I recently moved back to the UK and bought my iphone 4 with me. It is unlocked and works on the new contract that I have set up here in the UK. The problem I'm having is that some of the UK numbers that I had already had on the iphone in Korea as international UK numbers will now not work as they are still coming up as international numbers. This means it is costing me a lot to message or call these numbers. I have tried changing the number format various ways, deleting the numbers (although it still seems to remember them), resetting the phone, restoring the phone.
    How can I succesfully change these numbers?
    Any UK numbers I have added since changing the contract are working fine.
    Thanks!

    Do you happen to have Dial Assist on? This is in Settings>Phone. This is what helps the phone identify international numbers when dialing, based on location. See if turning that off/on makes a difference. Unless you are making a number of international calls, I believe this can be left off. See the User Guide http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf  Page 49 has info regarding Dial Assist.

  • International panel number format

    In the International panel of the System Preferences I would like to set the number format but there is no customise button.
    I would like to achieve the following combination, all of which are crucial to the operation of some applications:
    *main language:* English, then French, then Dutch then German.
    *names of the days of the week and months of the year*: in English
    *date format:* YYYY-MM-DD (e.g. 2008-06-24)
    *time format:* HH:MM:SS 24-hour clock (e.g. 23:36:34)
    *number format:* 1'234.56
    currency: euro
    *measurement system:* metric.
    If anyone can do this, please tell me how!
    The customise button for numbers disappeared already in Tiger and this problem has never been fixed to my knowledge.

    Answer obtained: you have to wait for Snow Leopard, but in the meantime you can set the format by terminal command:
    defaults write -g AppleICUNumberSymbols -dict-add 1 \'
    defaults write -g AppleICUNumberSymbols -dict-add 17 \'
    The numbers are:
    0 -- decimal separator for numbers .
    1 -- thousands separator for numbers '
    2 -- number formats ¤ #,##0.00;¤ -#,##0.00
    4 -- starting character for numbers; for example, if you set the value to a, instead of numbers 0-9 you will see characters a-j (well, this is not that useful!).
    8 -- currency symbol €
    10 -- decimal separator for currency .
    17 -- thousands separator for currency '

  • International Phone Number formatting

    Hello all,
    I'm wondering if there are any open source phone number formatting libraries out there? The phone numbers can come from anywhere in the world.
    I would get something like this
    0112024444444
    Algeria
    and get
    011 20 (2) 444-4444
    Thanks,
    Ralph

    I'm sure there are, but there's a lot of formats out there. Why not just have a single field and let people put what they want. If it's not a valid number, then they won't get a call.

  • Wm_Valid: Fail to convert to internal representation error while inserting

    Hi,
    I'm trying to execute an insert via XmlCommand. The table is created with this statement:
    create table testtable4 (testtable4_pk number, mydate date, myts timestamp with time zone, wm_valid wm_period);
    I have a problem while inserting on a simple table with wm_period field. The c# code is the following:
    OracleConnection oraConnection;
    OracleCommand insertCommand;
    string[] KeyColumnsList = null;
    string[] UpdateColumnsList = null;
    string xml1 = "<?xml version=\"1.0\"?>\n" +
    "<ROWSET>\n" +
    "<MYROW num = \"1\">\n" +
    "<TESTTABLE4_PK>1</TESTTABLE4_PK><MYDATE>2012-01-20T00:00:00.00000</MYDATE><MYTS>01-01-11T00:00:00.000000000 +00:00</MYTS>" +
    "</MYROW>\n" +
    "</ROWSET>\n";
    string xml2 = "<?xml version=\"1.0\"?>\n" +
    "<ROWSET>\n" +
    "<MYROW num = \"2\">\n" +
    "<TESTTABLE4_PK>2</TESTTABLE4_PK><MYDATE>2012-01-20T00:00:00.00000</MYDATE><MYTS>01-01-11T00:00:00.000000000 +00:00</MYTS><WM_VALID><VALIDFROM>01-01-11T00:00:00.000000000 +00:00</VALIDFROM></WM_VALID>" +
    "</MYROW>\n" +
    "</ROWSET>\n";
    KeyColumnsList = new string[1];
    KeyColumnsList[0] = "TESTTABLE4_PK";
    UpdateColumnsList = new string[4];
    UpdateColumnsList[0] = "TESTTABLE4_PK";
    UpdateColumnsList[1] = "MYDATE";
    UpdateColumnsList[2] = "MYTS";
    UpdateColumnsList[3] = "WM_VALID";
    try
    string ConnString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + host + ")(PORT=" + port + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" + sid + ")));User Id=" + username + ";Password=" + password + ";";
    oraConnection = new OracleConnection(ConnString);
    oraConnection.Open();
    using (OracleCommand cmd = new OracleCommand())
    cmd.Connection = oraConnection;
    cmd.CommandText = "alter session set NLS_DATE_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SS.SSSSS'";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "alter session set NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SS.SSSSS'";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "alter session set NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD\"T\"HH24:MI:SSXFF TZH:TZM'";
    cmd.ExecuteNonQuery();
    insertCommand = new OracleCommand();
    insertCommand.Connection = oraConnection;
    insertCommand.XmlCommandType = OracleXmlCommandType.Insert;
    insertCommand.XmlSaveProperties.KeyColumnsList = KeyColumnsList;
    insertCommand.XmlSaveProperties.RowTag = "MYROW";
    insertCommand.XmlSaveProperties.Table = "TESTTABLE4";
    insertCommand.XmlSaveProperties.UpdateColumnsList = UpdateColumnsList;
    insertCommand.XmlSaveProperties.Xslt = null;
    insertCommand.XmlSaveProperties.XsltParams = null;
    //this works
    insertCommand.CommandText = xml1;
    insertCommand.ExecuteNonQuery();
    //this fails
    insertCommand.CommandText = xml2;
    insertCommand.ExecuteNonQuery();
    insertCommand.Dispose();
    oraConnection.Close();
    oraConnection.Dispose();
    catch (Exception err)
    this.WriteLogErr("ERROR: " + err.Message);
    With the first ExecuteNonQuery I attempt an insert of a data value and a timestamp with timezone value. The execution is ok (xml1).
    When the second ExecuteNonQuery is run (with the value of wm_valid), the execution fails with this error:
    ERROR: ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: Fail to convert to internal representation: 01-01-11T00:00:00.000000000 +00:00' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 111
    ORA-06512: at line 1
    The stored procedure at row 111 calls this Java method:
    oracle.xml.sql.dml.OracleXMLStaticSave.insertXML(int, java.lang.String) return int
    The structure of complex data type wm_period is:
    CREATE OR REPLACE TYPE wm_period AS OBJECT (
    validfrom TIMESTAMP WITH TIME ZONE,
    validtill TIMESTAMP WITH TIME ZONE);
    The problem is: I am able to insert a timestamp with timezone value (myts) but I'm not able to insert a wm_valid that contains two values of the same type...
    This works: <MYTS>2011-01-01T00:00:00.00000</MYTS>
    This fails: <WM_VALID><VALIDFROM>2011-01-01T00:00:00.00000</VALIDFROM></WM_VALID>
    I also tried to change the format of NLS_TIMESTAMP_TZ_FORMAT with a lot of various setup, but nothing changed.
    Thanks in advance for your precious help.
    Best Regards,
    Mario.

    Hi jschell ...thnx for ur reply......
    the getString(2) parameter is just avarchar which
    return the error from the procedure, if its ok,then
    the query is executed properly..its just a check I've
    kept to jump into the next step.If the status is OK,
    then I'm retrieving the values from the cursor. I'm
    getting right value for this parameter.I wasn't questioning the logic. I understand what you are doing.
    However JDBC drivers can have problems when items are retrieved out of order.
    You might also try switching driver types. If the thin works and oci doesn't (or visa-versa) then you know it is a driver problem and you will just have to try a work around.

  • Fail to convert to internal representation: oracle.sql.DATE

    I'm using the oracle 8.1.7 jdbc driver against oracle 8.1.7 running on NT, and I get the exception message below when I attempt to insert an jpub object structure into a prepared statement.
    All date objects have been constructed from a timestamp object, using the oracle.sql.DATE Timestamp constructor. So I'm surprised to get this error given the timestamp object was successfully constructed.
    I've tried session date formats of 'yyyy-mm-dd hh24:mi:ss' and 'mm/dd/yyyy hh24:mi:ss', with no success.
    I can call stringValue on oracle.sql.DATE and it returns a valid date.
    Can someone confirm that they have been able to use the oracle.sql.DATE class to insert a date correctly into the database? Its seems a silly question to ask but you have to start somewhere!
    Exception : Fail to convert to internal representation: oracle.sql.DATE@3c144e8a
    Stack trace : java.sql.SQLException: Fail to convert to internal representation: oracle.sql.DATE@3c144e8a
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829)
    at oracle.jdbc.oracore.OracleTypeADT.toDatum(OracleTypeADT.java:261)
    at oracle.sql.StructDescriptor.toOracleArray(StructDescriptor.java:385)
    at oracle.sql.StructDescriptor.toArray(StructDescriptor.java:560)
    at oracle.sql.STRUCT.<init>(STRUCT.java:95)
    at oracle.jpub.runtime.MutableStruct.toDatum(MutableStruct.java:65)
    null

    The JPub/JDBC runtime is converting your Java object into Oracle-specific representation (all data is put in oracle.sql.XXXX format). The top level object is an oracle.sql.STRUCT, the attributes of which are represented as an array of oracle.sql.Datum objects - in your case an oracle.sql.NUMBER and an oracle.sql.DATE. However, the error does occur in the StructDescriptor which describes the SQL type and the shape of the object. Is the error dependent on the data values? Might null values not be dealt with, correctly?
    One thing to try to do is create such an oracle.sql.STRUCT object from scratch with the same attribute values and insert/manipulate that using SQL.
    I have not dealt with TAR's. If you send me a self-contained test case, I'll check it against the current development version of JDBC. (At least you'll know if the next JDBC release fixes this issue :-) I might also file a bug.

  • Phone number format edit

    Hello everyone, i have a problem with my iPhone 4S. I'm from Romania so it's not a verizon problem only... When a person in my contact list is calling me it only shows the numer of the caller not the ID, but after i hang-up and go to call history it shows the ID. I tried to put +4 in front of the number but now when someone is calling it shows the ID but in call history it shows the phone number. The phone is Jailbroken so if there is any solution what requires a jailbroken phone i am happy to try it out. The format region is on Romania and the International Assist is OFF. I tried as many things i could find on the internet about this but still can't figure it out. Can you guys help me? My firmware is 5.1.1 and i DON'T want to upgrade to 6 because i use a gevey sim card to unlock it, so anything else that can help ?

    Thanks, indeed. I had my Phone language set to "English (United States)" . I never thought that this would change the number format. I changed it to English and now it's ok.
    + it stopped with that annoying correction while i'm writing text.
    So double thanks
    Attachments:
    wp_ss_20130524_0002.jpg ‏71 KB

  • Number format issue

    I just set up my computer to use the Argentine region to display dates, numbers, times, meassures, etc. The problem is that MS-Excel continues to display the comma to separate thousands instead of periods (i.e: 1,056 instead of 1.056) and this is causing me troubles with calculations. Isn't Mac OS X supposed to handle the number format across the system? or does Exel has a mind of its own when it comes to formatting numbers?
    Thanks

    Microsoft always has marched to the beat of their own drummer but I found this in the Excel help that seems to indicate they are at least trying to do things right. Check the Notes section at the end.
    ===============
    • Format values in euro currency style
    Use this procedure to apply a euro currency style to the selected cells. If the cells you want to format contain non-euro values, you instead need to convert the values to euros by using the EUROCONVERT function.
    To use the EUROCONVERT function, you must select the Euro Currency Tool check box on the Add-ins dialog box (Tools menu, Add-ins command). If you do not see Euro Currency Tool listed in the Add-ins dialog box, then you must install the Excel Add-ins component, and then quit and restart Excel. For step 5 (Installation) of the Setup Assistant, expand Office Tools by clicking the arrow next to it, and then select the Excel Add-ins check box.
    1. To display the Formatting toolbar, click View, point to Toolbars, and then click Formatting.
    2. If you don't see the Euro Style button on the Formatting toolbar, click Preferences on the Excel menu, click Edit, and then select the Show Euro tool check box.
    3. Select the cells that you want to format as euro currency style.
    4. Click the Euro Style button.
    Notes
    • If you want to type the euro sign () in a cell, you can do so on a U.S. keyboard by pressing SHIFTOPTION2.
    • The settings on the Formats or Numbers tab on the International pane (System Preferences) determine the position of the euro sign (that is, whether the symbol appears before or after the number and whether a space separates the symbol and the number), as well as the decimal symbol and the thousands separator.

  • Convert Mainframe Packed Decimal to Oralce Number Format

    Dear all,
    I am having a file in which amount fields are given in a Packed Decimal format. Can anyone suggest me how I can read this data element from the file and convert it into Oracle Number datatype.
    File is a fixed length. All the amount fields are given in Packed Decimal Format and rest of the fields are given in text format.
    Thanks and regards
    Nagasayan Puppala

    Hi,
    Firstly thanks for your reply.
    Actually I am not using SQL Loader to load data from
    a flat file to Oracle table. I am writing a custom
    program that reads the file and populates the oracle
    table. I'll put aside the question of 'why' you'd want to do that. SQL*Loader's singular purpose in life is to load flat files of data into Oracle DB. Sometimes there is a reason for reinventing the wheel.
    How does your program communicate with the Oracle DB? If utilizing ESQL and Pro*Cobol (or Pro*<whatever> ) you will have read the data into a variable of some type in you host language. The variable of the host variable to hold the value (if you did a 'select from' that table) would be the correct target type for an insert statement. Whatever host language type conversion is available bewteen those two types ( if they are different at all ) is all that is needed. The precompilers have converters between certain native host and internal Oracle types built-in. It is how you get any data between the two systems. This is only a problem if the host language has no converter between the numeric types (if differnet.). When you read from the flat file are you reading it into a native packed decimal in the host language?
    ODBC/JDBC similar strategy..... cast conversion between the native type that Oracle wants and the one into which your custom program reads it into.
    So I want to know whether there are any Oracle
    utility programs that will convert the packed decimal
    to a oracle number format or not.There are Oracle routines that convert into the native Oracle DB formats. There are implicitly available through the normally utilized interfaces to OCI ( ESQL and ODBC/JDBC ) . There are none decoupled from those interfaces though (that I know of).
    There are no standalone programs that mutate a flat file into another flat file that then could be loaded. That's is typically slower and utilzes more space than most customers want than just directly inputing the data into Oracle DB.
    Message was edited by:
    lytaylor

  • How to stop Outlook 2007 from changing my telephone number format?

    I'm using Windows 7 and Outlook 2007 (and Exchange 2007 SP1).
    Now, in Outlook's contact, whenever I enter a telephone number, the stupid Outlook 2007 always tries to be smart and add brackets to the first few digits!  There's no brackets in tel number.  How could I make it stop from being too smart and changing anything?

    I've found another PC with XP and Outlook 2007, but I still can't find any service called "Windows Dialing".  But I tried it anyway.  Guess what I got: in this computer, a normal local telephone format isn't changed.  But when the number is in long distance format, ie +XX YYYYYYY, Outlook 2007 stupidly removes the '+' sign in front of it!
    I then tried in my first PC to see what would happen to international telephone number format.... it's OK, the '+' sign isn't deleted.
    What a f**k!  What's this ____ called Outlook 2007 which tries to reformat things it can't understand??
    I have exactly the same problem - I am in the UK and have a pile of UK numbers stored in international format (which most cell phones recognise and some generate automatically from incoming calls). So the number would be entered as +44 1234 56789. Outlook strips off the + and, because I sync with my pda, the numbers get exported to it in a broken state :-(
    In the UK, we don't drop leading digits - to dial a number I either dial 01234 56789 or +44 1234 56789. We don't really use local numbers a lot in the UK - it doesn't make any difference within a local area if I dial the full code, just the local number or the international version. So there is no need for Outlook to do anything.
    This is extremely aggravating - sure ly Outlook is not hard coded to use  US phone dialling methods?
    There must be a way to disable the automatic parsing of numbers - if not it is bug that needs fixing, IMHO...
    Rgrds
    Peter

  • How to make sure what material number format is the same in SRM and R/3?

    Hi all!
    I faced the following problem:
    "Product does not exist in plant or it has been flagged for deletion". This error message occurs during shopping cart creation or during transferring purchase requisition from R/3 to SRM. It seems like SRM carries out some material checking in R/3 before shopping cart save and can't find out appropriate R/3 material. The only reason I can assume is different material number formats in SRM and R/3. Material number length is the same in both systems.
    Thanks in advance,
    Alexander.

    Alex-
    We experienced this problem just recently.  Our situation involved trying to add a material to the cart from an internal catalog (CCM).  As mentioned earlier their is a configuration setting to indicate the number of characters the "Product" (SRM terminolgoy) or "Material" (R/3 terminology) should be.  We made our setting 18 characters (same length as field in R/3).  The important thing to understand is that the material number is actually defined as a character field, not a numerical field so the length of the material "number" is critical for the system to accurately check the material.  Do the following and see if you correct the error.
    1)  Go into transaction COMMPR01 in SRM, select the search tab and choose Material in the Find box, then click start.  Choose the material you are experiencing the problem on and verify that the number of characters is the same in SRM as it is in R/3.
    2)  Next, go into R/3 and look at table entries in MARC for the material.  This will show you all the different plants associated with the material.
    3)  Finally, create a cart and procure the material.  If you get the error message go to the basic data of the cart and verify the location (plant) is one of the plants you found in step 2.  If not, change the location to one from step 2 and check the cart.

  • External Alphanumeric Number Range for Internal Orders

    Hello,
    I am trying to create external number range for Internal Order Type. I want to create internal orders which will have internal order number as alphanumeric and some will be in only numbers.
    How should be the range look like, so that I have flexibility to enter Internal Order number as whatever format I want i.e. T123, 12MP, 1234, ABCD etc.
    Any help will be appreciated.
    Thanks.

    how many do you need?
    Just one, that covers all?
    a0000000 - zzzzzzzz

  • Changing Contacts telephone number format

    Hi all. I bought an iphone 6 in USA and I am from Argentina. In the apple store (USA) the product was activated.
    Do you know how can I change the Contacts' phone numbers' format so as to avoid the use of brackets () ?
    I already selected the propper language for me (spanish) and the Region (Argentina) but the formats remain unchanged.
    I still haven't placed a SIM into the iphone because I have to ask the carrier for a Nano-SIM which I do not have at the moment. May this be the problem? When I insert the new SIM I will have the right formats?
    Thanxs!
    Juan

    I've found another PC with XP and Outlook 2007, but I still can't find any service called "Windows Dialing".  But I tried it anyway.  Guess what I got: in this computer, a normal local telephone format isn't changed.  But when the number is in long distance format, ie +XX YYYYYYY, Outlook 2007 stupidly removes the '+' sign in front of it!
    I then tried in my first PC to see what would happen to international telephone number format.... it's OK, the '+' sign isn't deleted.
    What a f**k!  What's this ____ called Outlook 2007 which tries to reformat things it can't understand??
    I have exactly the same problem - I am in the UK and have a pile of UK numbers stored in international format (which most cell phones recognise and some generate automatically from incoming calls). So the number would be entered as +44 1234 56789. Outlook strips off the + and, because I sync with my pda, the numbers get exported to it in a broken state :-(
    In the UK, we don't drop leading digits - to dial a number I either dial 01234 56789 or +44 1234 56789. We don't really use local numbers a lot in the UK - it doesn't make any difference within a local area if I dial the full code, just the local number or the international version. So there is no need for Outlook to do anything.
    This is extremely aggravating - sure ly Outlook is not hard coded to use  US phone dialling methods?
    There must be a way to disable the automatic parsing of numbers - if not it is bug that needs fixing, IMHO...
    Rgrds
    Peter

  • Retrieving data from Excel format to internal table(deep structure)

    hi all,
    can anybody help me how to Retrieving data from Excel format to internal table(deep structure)
    and if u have any sample code for that please send it.
    my internal table is like this
    DATA: BEGIN OF ty_text,
    vbeln TYPE vbeln,
    posnr TYPE posnr,
    seqno TYPE seqno,
    textid TYPE tdid,
    tdline TYPE tdline,
    END OF ty_text.
    DATA: BEGIN OF ty_item,
    vbeln TYPE vbeln,
    posnr TYPE posnr,
    dispct1(16),
    dispct2(16),
    dispct3(16),
    text LIKE table of ty_text,
    END OF ty_item.

    hi,
    check this code
    TABLES:zmatnr.
    TYPE-POOLS  truxs.
    DATA : itab LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    DATA row LIKE alsmex_tabline-row.
    data : gi_final like zmatnr occurs 0 with header line.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETER : pfname LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfname.
      PERFORM search.
    START-OF-SELECTION.
    perform process.
    form process.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = pfname
          i_begin_col             = 1
          i_begin_row             = 2
          i_end_col               = 12
          i_end_row               = 65000
        TABLES
          intern                  = itab
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 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.
      describe table itab lines itab_count.
       row = 1.
      loop at itab.
        if itab-row <> row.
          append gi_final.
          clear gi_final.
        endif.
        case itab-col.
          when '1'.
          gi_final-MATNR = itab-value.
          when '2'.
           gi_final-Maktx = itab-value.
          endcase.
        row = itab-row.
      endloop.
      append gi_final.
      clear gi_final.
    endform.
    FORM search .
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          static    = 'X'
        CHANGING
          file_name = pfname.
    ENDFORM.
    regards
    siva

Maybe you are looking for