Filename of inbound CSV in UDF

Hello,
I would like to insert the filename of an inbound (CSV) file into a UDF in B1.
Scenario: F.AnySystem to B1. All the field mapping of the fields inside the file is done and works perfectly. But how can i get the filename?
Does anybody have a hint of how to do that?
Thanks a lot for any suggestions
Agnes

Hi Agnes,
The inbound message from your file scenario should have the following tag in the message header:
<b1im:FileInbound xmlns:b1im="urn:com.sap.b1i.sim:b1imessage" LocalObjectType="ItemNr"
extension="csv" filename="Artikelstamm_1004061929"
filespec="E:\INSTALLATIONSPUNKT\SAP B1iSN\Szenarien\B1iSNTest\In\Artikelstamm_1004061929.csv"
encoding="ISO-8859-1" delchar=";" wrapchar="" xml_objID="" csv_objID="" txt_objID="" xpath="" offsetdef="" />
Then you can use the following variable in your xsl:
<xsl:variable name="Filename" select="/b1im:B1IMessage/b1im:Header/b1im:FileInbound/@filename"/>
This would get the filename without extension.
For example you could also use the attribute @filespec in combination with the following function to get the full filename without path:
<xsl:call-template name="b1ilib.substring-after-last">
     <xsl:with-param name="substr" select="&apos;\&apos;"/>
     <xsl:with-param name="wstrg" select="$filespec"/>
</xsl:call-template>
Be sure to include the string-library at the end of your xsl:
     </xsl:template>
     <xsl:include href="../../com.sap.b1i.system.lib/xsl/string.xsl"/>
</xsl:stylesheet>
Kind regards,
Marcus
Edited by: Schmalz Marcus on May 28, 2010 11:57 AM

Similar Messages

  • Use a flexible Filename in REPORT CSV OUTPUT

    -> ReportAttributes -> csv-output -> filename
    I tried to use &item. and :Item but it seems the FILENAME of the csv-output is fixed. But I would like to give a name depending from context. Any ideas ?

    Marc,
    Sure. The region is a PL/SQL function body returning a SQL query :
    declare q varchar2(256);
    begin
    q := 'select * from ' || v('CURRASSVIEW');
    if v('CURRASSSLXID') IS NOT NULL THEN
    q := q || ' WHERE INSTR(' || '''' || v('CURRASSSLXID') || '''' || ', SLXID ) > 0';
    end if;
    return q;
    end;
    Where CURRASSVIEW is an app item that is the name of a VIEW object behind the scenes. Various view objects have been created to peek into a data wharehousing scheme. Unfortunately, I can't go into great detail....my company would freak if I posted actual data (pharmaceutical). However, I have tracked it down to the following scenario :
    One of the columns that comes through is a VARCHAR2(2). The excel-spoolling is fine while this column is empty, and when the report in Excel reaches a row with a value in this column, it dies. The values are all of length 1, so I'm not sure where else to look.
    Sorry for lack of details...any hints you could give as to where to continue research would be appreciated.
    Matt

  • Inbound CSV file containing  the date in the name

    Dear all,
    I have a very small problem on the import file process.
    I have configure a new SLD with the following pattern
    pluton\edi\B1I_CCO\In\QC_ROUT_*.TXT (this is a DSV file).
    I have defined a bizstep reading these files but the problem is that the file name contains the date.
    I have read in the documentation that a function exists in B1i (page 14 of the Ref2).
    So I have indicated as :
    - Identification Method: File Name
    - Identification Parameter : substring(filename,0,7)
    - Identifier : QC_ROUT
    But it does not work.
    Do you notice something wrong in it?
    thank you for your help.

    Hi Damien,
    Please find more explanation of using the "identification parameter" for file inbound in following segment:
    Identification Method = u201C File Name u201D
    The Scenario Step is subscribed to the incoming file in case the name of the file (without extension) is equal the string in the field Identifier. You can use the field Identification Parameter to define a substring. In this field you can define the position (e.g. 2) which triggers B1if to compare the filename from this position only or even position and length separated by comma (e.g. 2,3) which triggers B1if to compare this particular substring only. Sample: The file u201C test.xml u201D will trigger the Scenario Step in the following cases:
    Identifier = u201C test u201D
    Identifier = u201C est u201D and Identification Parameter = u201C 2 u201D
    Identifier = u201C es u201D and Identification Parameter = u201C 2,2 u201D
    please enter the following:
    - Identification Method: File Name
    - Identification Parameter : 1,7
    - Identifier : QC_ROUT
    De- and reactivate your scenario and it will be working as expected.
    Best regards
    Bastian

  • Generate target filename dynamically / Receiver File Adapter

    Hi Community Members,
    First of all I would like to say hello to everybody, as this is my first post in this forum.
    I start with PI and would like to prepare a simple DEBMAS -> .csv interface.
    In fact it is already done, but the requirement is to name .csv files according to customer number (KUNNR).
    Hence is my question ... how to set CC to be assigning KUNNRs to file names? (like 123456.csv)
    From what I can in the net people are using ASMA, but isn't there any simpler solution?
    What I tried inside message mapping was to bound KUNNR field from my source message to root element of target message.
    In addition I also set Field Name Scheme to *.csv in CC settings. Unfortunately I am receiving a CC error
    The parameter "argument" has the value "/interfaces/PI/inbound/test/.csv", so it contains the character "/interfaces/PI/inbound/test/.csv" which is not allowed
    But anyway if I would like to use ASMA I see I need to write a Java funciton as UDF.
    Example tutorial [http://www.****************/Tips/XI/ASMA/Index.htm]
    But what next? How would I implement it into message mapping, to which xml element should it be assigned and what should be passed as function input, to make java function work?
    Regards,
    bob

    hI bobens ,
    you have to follw bellow steps  because dynamicalluy we had call file name as same as your requirement.
    STEP1:  WRITE dynamic configuratio:
    Public String DynamicConfig(String a, Container container) throws StreamTransformationException{
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key,a);
    return "";
    step2: in mapping
    KUNNR + constant(.CSV) -> Concat -> udf(dynamic configuration) -> target root node
    Configuration objects:
    3. Receiver communication channel:
    file name : ConfiguredDynamically
    in Adavnce mode :
    you have to enable these check boxes: use asma , fail  if asma,  filename.
    thanks,

  • FileName using Variable Substitution Method

    Hi SAP experts,
    I need some advise regarding this.
    I have here sample structure of message,
    DT_Root  --> root node
      Tree  --> occurence is 1 to unbounded
        SubTree1
        SubTree2
        SubTree3
    What will be my File Content Conversion parameters to be set in Variable Substitution Method in order for me to get the value of SubTree3 and make it as my filename?
    Also, the value of SubTree3 must not be present on my actual payload..
    var1:payload,1,SLI,1   ---?? what if it is unbounded?
    Kindly advise.
    Thank you very much.

    Hi Raj,
    I cannot open the link.
    Anyway, is it ok if you will advise me regarding my question a while ago?
    I have here sample message structure,
    CSV --> Message Type
    SLI  --> 1 .. unbounded (occurence)
      subSLI1
      subSLI2
      subSLI3
    FileNode --> 1..1 (occurence)
      FileName --> 1..1
    Here's my parameters in Variable Substituion method,
    FileName Scheme: %var1%.csv
    var1   --  payload:CSV,1,FileNode,1,FileName,1
    File Content Conversion Parameters:
    Recordset Structure: SLI,FileNode
    SLI.addHeaderLine: 3
    SLI.headerLine: PERIO;EAN;ILN,....
    SLI.fieldFixedLengths: 8;10;13;...
    SLI.fixedLengthTooShortHandling: Cut
    SLI.fieldSeparator: ;
    SLI.endSeparator: 'nl'
    FileNode.fieldFixedLengths: 0
    FileNode.fixedLengthTooShortHandling: Cut
    I must the output flatfile with a value of the filename in the FileName field.
    And the content of the flatfile must look like this,'
    PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR;ARKTX
    20071020;737052020198 ;4333342000008;         1;        9.95;W;X;ST ;EUR;0000000000;ST ;                                  
    20071020;737052056852 ;4333342000008;         1;       14.50;W;X;ST ;EUR;0000000000;ST ;                                  
    20071020;737052073552 ;4333342000008;         1;       12.95;W;X;ST ;EUR;0000000000;ST ;                                  
    *each field has a fixed field length.
    Kindly advise if my set parameters are correct.
    Thank you very much!

  • Need help to download csv file in application by writting to outputstream.

    HI All,
    Requirment of my client is donloading CSV file from portal.
    My approach  is:
    On clicking "Download" button in JSP I am calling an action in controller and from here I am redirecting call to DownloadCSV.jsp where i am writing to output stream of response.
    Action called in controller:
         @Jpf.Action(forwards = { @Jpf.Forward(name = StaticConstants.SUCCESS, redirect = true, path = "DownloadCSV.jsp") })
         public Forward gotoReports() {
              Forward forward = new Forward(StaticConstants.SUCCESS);
              return forward;
    Download jsp:
    response.resetBuffer();
         response.reset();
         response.setContentType("application/vnd.ms-excel");
         response.addHeader("Content-Disposition", "attachment;filename="+ companyId +"_Audit_Report.csv");
         ServletOutputStream os = response.getOutputStream();
              os .println();
              os .print("DATE");
              os .print("USER");
    os .println();
    os.flush();
    os.close();
    I am able to download the csv file in excel. But after that i am not able to perform any operation in portal page. Mouser pointer becomes busy and cant click on anything.
    Second approach followed:
    I wrote the code for writting to outputstream of outputresponse in controller action itself and forwarded to the same jsp where my download button resides.
    Problem:
    Download happens perfectly but the excel in csv format contains the portal framework generated content also other than content i wrote to response.
    If u have any other approach to download an excel without redirecting to JSP plz let me know. Coing is being done in 10.2 weblogic portal.
    Please help. Its very urgent.
    Plz let me know how a file can be downloded in portal context without keeping a file at server side. I need to download file by writting to outputstream.
    If it is possible plz attach one small example project also.
    Thanks a ton in advance.
    It is very important plz do reply.

    Hi Srinivas,
    For downloading binary content that is not text/html, the Oracle WebLogic Portal content management tools use javascript in an onclick event handler to set the window URL to the URL of a download pageflow controller: window.location = url. The content management tools are in a portal so it should be possible for you to do the same thing.
    The url is a custom pageflow controller that streams the bytes to the response. It sounds like you already have a pageflow you could recycle to use in that way. You don't want to stay within your portlet pageflow because then you will be streaming bytes into the middle of a portal response. You want a separate download pageflow that you invoke directly, outside of the portal framework (in other words, don't invoke it by rendering a portlet that invokes the pageflow).
    You can set the url to invoke the pageflow directly by giving the path to the pageflow controller from the web root (remember the pageflow path matches the package name of the pageflow controller class) like this: "/content/node/nodeSelected/download/DownloadContentController.jpf"
    By the way, for the case of text/html, the tools uses a standalone portlet URL so that the text/html is not rendered in the browser window, which would replace the portal markup (because the browser renders text/html by default, instead of giving you a download widget or opening some other application to deal with the bytes).

  • Issue while downloading file in .CSV format

    Hi,
    I need to download the file in .CSV format.
    I hade used FM SAP_CONVERT_TO_CSV_FORMAT  and then used GUI_Download.
    Now when I am opening file which is downloaded, it gives all the data in a single column. If there are 5 fields in my table, the generated file gives the data of all the 5 fields in a single column.
    Could you please help?

    Hi try wi th the following code.
    TYPE-POOLS : truxs.
    DATA: t_file TYPE STANDARD TABLE OF type_file.
    data:t_conv_data TYPE truxs_t_text_data.
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
      EXPORTING
        i_field_seperator          = ', '
      TABLES
        i_tab_sap_data             = t_file
    CHANGING
       i_tab_converted_data       = t_conv_data
    EXCEPTIONS
       conversion_failed          = 1
       OTHERS                     = 2.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                = 'C:\TESTCSV.CSV'
        filetype                = 'ASC'
        write_field_separator   = '  '
      TABLES
        data_tab                = t_file
       fieldnames              = names
      EXCEPTIONS
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        no_authority            = 5
        unknown_error           = 6
        header_not_allowed      = 7
        separator_not_allowed   = 8
        filesize_not_allowed    = 9
        header_too_long         = 10
        dp_error_create         = 11
        dp_error_send           = 12
        dp_error_write          = 13
        unknown_dp_error        = 14
        access_denied           = 15
        dp_out_of_memory        = 16
        disk_full               = 17
        dp_timeout              = 18
        file_not_found          = 19
        dataprovider_exception  = 20
        control_flush_error     = 21
        OTHERS                  = 22.

  • Data Migration from CSV file to Database Table.

    Hi,
    I have checked few answered threads on Data Migration Issues but didn't find the solution yet.
    I am reading data from an CSV file to internal table but the complete row is coming under one field of the internal table.
    How i can get values in different fields of the internal table from the CSV file ?
    Thanks & Regards.
    Raman Khurana.

    Hi,
    If you are using GUI_UPLOAD, you might have missed to make has_field_separator  as 'X'.
      EXPORTING
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       filename                      = 'C:\File.csv'
       filetype                      = 'ASC'
       has_field_separator           = ' X'  "<= Set this as 'X'.
      TABLES
        data_tab                      = itab.
    Regards,
    Manoj Kumar P

  • Impossible to send back a CSV file containing more than 8000 chars

    Hello,
    I work on an application using Spring and I try to write a String of around 19000 chars in a CSV file that I send back to the client with the method PrintWriter.write (response.getWriter().write) of the object HttpServletResponse. Here is the code :
    public ModelAndView getViewdomainReport(HttpServletRequest request, HttpServletResponse response) throws Exception {
    // domainString is a string containing around 19000 chars
    String domainString = reportManagementService.getViewdomainReport(domainRows,domain);
    String filename = domain.getDomainNameWithoutBlank()+".csv";
    response.setContentType("text/csv");
    response.getWriter().write(domainString);
    response.setHeader("Content-Disposition", "attachment; filename=\""
                       + filename + "\"");
    return null;
    The following thing is strange : when the String domainString has less than 8000 chars, the file CSV is sent back to the client with the appropriate name and I can open it with EXCEL. When I exceed 8000 chars, I cannot get the response with a CSV format, but the response is directly sent to the browser as a String (domainString) printed directly in the browser page with the URL /getViewdomainReport.htm. That is I exceed the capacity of a sent file with the method write. I think that the fact that it is sent in a CSV format has no importance. It would be the same with a html format or else. It is surely the size of the response which is limited. What can I do ? is it a buffer matter ? how can I get my 19000 chars in my CSV file so I can open it with EXCELL ?
    If you can help me, thank you in advance

    Please don't cross post. As your thread in New to Java has the largest number of replies, please continue in that thread.
    [http://forums.sun.com/thread.jspa?threadID=5338772]
    I'm locking this thread and the one you posted in Java Servlet.
    db

  • Read a csv file and read the fiscal yr in the 4th pos?

    Hello ABAP Experts,
    how to write a code for read a csv file and read the fiscal year in the 4th position.
    any suggestions or code highly appreciated.
    Thanks,
    BWer

    Hi Bwer,
    Declare table itab with the required fields...
    Use GUI UPLOAD to get the contents of the file (say abc.csv) in case if the file is on the presentation server...
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'c:\abc.csv'
       FILETYPE                        = 'ASC'
        WRITE_FIELD_SEPARATOR           = 'X'
      tables
        data_tab                        = itab
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       OTHERS                          = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use OPEN DATASET in case if the file is on the application server..
    After that USE SPLIT command at comma to get the contents of the 4th field...
    Regards,
    Tanveer.
    <b>Please mark helpful answers</b>

  • CSV Export

    I am exporting a Report into the CSV file. The problem is I am having a column called NAME - which is having first name and last name with comma.
    exp
    Name
    abc, xyz
    aaa, bbb
    Now when I do the export .... in the CSV file the above column is coming in 2 seperate columns instead of one column. I am using the following ....code
    owa_util.mime_header('application/excel',FALSE );
    htp.p('Content-Disposition: attachment; filename=Report Output.csv');
    owa_util.http_header_close;
    Just wondering what the other changes I have to make??
    thanks,
    deepak

    Hi Deepak,
    csv are "comma separated values" files, so your comma is splitting the data into two fields.
    If it were me, I would use two fields anyway, but if you need a single field, you should enclose the entire string within quotes:
    '"' || lastname || ',' || firstname || '"' NAMEThis may work with just this data in quotes - but you may have to put quotes around all string values (numbers and dates won't need quotes).
    Andy

  • CFMail breaks up attachments filename with non ASCII

    Hi CF-Devs out there!
    My problem is, that when attaching files via cfmailparam - no
    matter if inline or not - and using a filename that contains or a
    non 7bit-ASCII character or a simple space, the filename is not
    displayed correctly in Outlook nor Thunderbird. I am sure that this
    topic has been discussed here earlier but I really don't find any
    topic when using the Forum Search function... so please help anyway
    :) I am still using CFMX 6.1 :(
    My code is the following:
    <cfmailparam type="#variables.attachments
    .getContentType()#"
    file="#variables.attachments.getFilename()#"
    disposition="#this.dispositionType(variables.attachments
    .isInline())#"
    contentID = "#variables.attachments.getCid()#">
    When I revise the generated email code then I find the
    following:
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename*2=nger.csv;
    filename*0*=UTF-8''emailempf; filename*1*=%c3%a4
    Content-ID: <DEE13419-D022-9396-C8A4DF2AAAA7C4EF>
    You can see that the filename (emailempfänger.csv)
    breaks up into several pieces which according to
    RFC 2231 is a
    valid format but obviously is not interpreted correctly by e.g.
    Outlook. Or am I missing something else?
    I would appreciate your help. Thanks in advance.
    Buergermeister

    The filename you used does not contain any non 7bit ASCII
    character. The problem only occurs if I use characters like
    "ä","ö","ü" but even [space] does provoke the error.
    The variables hold the following values (you can see them in
    the source posted, too):
    1) variables.attachments.getContentType() :
    application/octet-stream
    2) variables.attachments.getFilename() :
    [AbsoluteFilePath]/emailempfänger.csv
    3) this.dispositionType(variables.attachments.isInline()) :
    attachment
    4) variables.attachments.getCid():
    DEE13419-D022-9396-C8A4DF2AAAA7C4EF
    Cheers!

  • .csv file Vs .txt file Content conversion sender file channel

    Hi Experts,
                     I have a file with filename say input.csv.I want to do content conversion for these .CSV file.Is it same like we have to do for .txt file say input.txt.
    when i open my .csv file in notepad, i get multiple rows with each field separated by ';'.what are the content conversion parameters we have to define for .csv file and can we mention input.csv as the file name as a source file name.
    Thanks
    Deepak

    Hi,
    Use the following parameters for Sender file channel in case of reading .csv file
    Recordset Structure.fieldSeparator -
    Recordset Structure.endSeparator -
    'nl'
    Recordset Structure.fieldNames -
    provide field names separated with ,
    Regards
    Seshagiri

  • How to SAP data convert into csv file.

    hi,
    i have a one internal table , and i want to extract SAP data into csv file with filed separator ','(comma).
    Thanks

    you can use this coding for slove yours issue
    tables: vbak.
    Use type pool:
    TYPE-POOLS: TRUXS.
    parameters: p_erdat like vbak-erdat.
    DATA: COM TYPE C . For comma SEPERATOR
    data: begin of itab occurs 0,
          vbeln like vbak-vbeln,
          erdat like vbak-erdat,
          end of itab.
    DATA: ITAB1 TYPE TRUXS_T_TEXT_DATA OCCURS 0 .
    COM = ','.
    select vbeln
           erdat
           into table itab
           from vbak
           where erdat = p_erdat.
    FM:
    CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
    EXPORTING
       I_FIELD_SEPERATOR          = COM
      I_LINE_HEADER              =
      I_FILENAME                 =
      I_APPL_KEEP                = ' '
      TABLES
        I_TAB_SAP_DATA             =  ITAB
    CHANGING
       I_TAB_CONVERTED_DATA       = ITAB1
    EXCEPTIONS
      CONVERSION_FAILED          = 1
      OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FM:
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                  =
        FILENAME                      = 'C:\TEST.CSV'
       FILETYPE                       = 'ASC'

  • Problem uploading data from an .CSV file

    hello,
    I have a requirement in which i need to upload .csv file. I tried using GUI_UPLOAD and TEXT_CONVERT_CSV_TO_SAP. But the values are getting appending as a single value seperated by cama.
    for example, If there are 5 columns and 10 rows in my test.csv file. when i am using GUI_UPLOAD and TEXT_CONVERT_CSV_TO_SAP. I am getting data in 1 column and 10 rows. each row has 5 values seperated by column. the other 4 columns in the internal table are not populated.
    can anyone help me.
    Thanks and Regards,
    gautham

    hi,
    use the Function module 'ALSM_EXCEL_TO_INTERNAL_TABLE'.
    REPORT  ZSR_BDC_XL
            NO STANDARD PAGE HEADING LINE-SIZE 255.
    TABLES : LFA1,RF02K.
    DATA : BEGIN OF ITAB OCCURS 0,
           LIFNR LIKE RF02K-LIFNR,
           KTOKK LIKE RF02K-KTOKK,
           NAME1 LIKE LFA1-NAME1,
           SORTL LIKE LFA1-SORTL,
           LAND1 LIKE LFA1-LAND1,
           SPRAS LIKE LFA1-SPRAS,
           END OF ITAB.
    DATA : ITAB1 LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    DATA : B1 TYPE I VALUE 1,
           C1 TYPE I VALUE 1,
           B2 TYPE I VALUE 10,
           C2 TYPE I VALUE 99.
    INCLUDE BDCRECX1.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME                = 'C:\xl1.csv'
          I_BEGIN_COL             = B1
          I_BEGIN_ROW             = C1
          I_END_COL               = B2
          I_END_ROW               = C2
        TABLES
          INTERN                  = ITAB1
        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.
      PERFORM  ORGANIZE_UPLOADED_DATA.
    PERFORM OPEN_GROUP.
    LOOP AT ITAB.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0100'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM BDC_FIELD       USING 'RF02K-LIFNR'
                                  ITAB-LIFNR.
    PERFORM BDC_FIELD       USING 'RF02K-KTOKK'
                                  ITAB-KTOKK.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0110'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'LFA1-SPRAS'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM BDC_FIELD       USING 'LFA1-NAME1'
                                  ITAB-NAME1.
    PERFORM BDC_FIELD       USING 'LFA1-SORTL'
                                  ITAB-SORTL.
    PERFORM BDC_FIELD       USING 'LFA1-LAND1'
                                  ITAB-LAND1.
    PERFORM BDC_FIELD       USING 'LFA1-SPRAS'
                                  ITAB-SPRAS.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0120'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0130'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=ENTR'.
    PERFORM BDC_DYNPRO      USING 'SAPLSPO1' '0300'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=YES'.
    PERFORM BDC_TRANSACTION USING 'XK01'.
    PERFORM CLOSE_GROUP.
    ENDLOOP.
    FORM ORGANIZE_UPLOADED_DATA .
      SORT  ITAB1  BY  ROW
                       COL.
      LOOP  AT  ITAB1.
        CASE  ITAB1-COL.
          WHEN  1.
            ITAB-LIFNR = ITAB1-VALUE.
          WHEN  2.
            ITAB-KTOKK = ITAB1-VALUE.
          WHEN  3.
            ITAB-NAME1 = ITAB1-VALUE.
          WHEN  4.
            ITAB-SORTL = ITAB1-VALUE.
          WHEN  5.
            ITAB-LAND1 = ITAB1-VALUE.
          WHEN  6.
            ITAB-SPRAS = ITAB1-VALUE.
        ENDCASE.
      AT  END  OF  ROW.
    APPEND ITAB.
    CLEAR ITAB.
    ENDAT.
      ENDLOOP.
    ENDFORM.                    " ORGANIZE_UPLOADED_DATA
    if helpful reward points

Maybe you are looking for

  • How can I change the size of Dictionary.app panel?

    Hi! I love quickly looking up words while working in applications such as Safar, Pages or Mail. I go to Dictionary's preferences and set the Context Menu option Dictionary.app - Open Dictionary panel. But the size of the window pane is very small. In

  • Do I really want this software?

    I want to make several YouTube videos.  I want them to look polished & professional.  Each video will consist of high-quality, high-res still photographs which will be panned from inside and, at the end, panned out to full frame.  (I probably am usin

  • Simple User-Input AKA a DOS application.

    I've been doing some programming using the simple DOS commands, and reading keyboard input to read strings into variables. I've got an Applet at the moment with a text area (several rows high), and a text field (single line), and I've got the text ar

  • Additional attachment types that should be allowed

    I just noticed that some of my attachmnts from an email message didn't arrive but were silently dropped. I don't think silently dropping them is a very good policy, because people will attach harmless documents like install.log to a message and refer

  • Issue in updating item category

    Hi gurus,               I need to update the item category of the line item while saving a refund order.When a user manually enters an iitem and saves teh refund order,the item category should be updated say set to ZTR1.          I have used set prop