Use of LIST_TO_ASCI?

Hi Friends,
   I am trying to export a list to memory using SUBMIT and with the help of function module LIST_FROM_MEMORY downloading it from the memory. But its not in readable format. I need to get the results in an internal table so that it has got all the columns from the report. This has to be returned to a Java application for further processing. Will LIST_TO_ASCI be useful? How to use this function module? 
Prompt replies will be rewarded.
Thanks in advance.

DATA  BEGIN OF itab_list OCCURS 0.
        INCLUDE STRUCTURE abaplist.
DATA  END OF itab_list.
DATA: BEGIN OF vlist OCCURS 0,
        filler1(01)   TYPE c,
        field1(06)    TYPE c,
        filler(08)    TYPE c,
        field2(10)    TYPE c,
        filler3(01)   TYPE c,
        field3(10)    TYPE c,
        filler4(01)   TYPE c,
        field4(3)     TYPE c,
        filler5(02)   TYPE c,
        field5(15)    TYPE c,
        filler6(02)   TYPE c,
        field6(30)    TYPE c,
        filler7(43)   TYPE c,
        field7(10)    TYPE c,
      END OF vlist.
SUBMIT zreport EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = itab_list
  EXCEPTIONS
    not_found  = 4
    OTHERS     = 8.
CALL FUNCTION 'LIST_TO_ASCI'
  EXPORTING
    list_index         = -1
  TABLES
    listasci           = vlist
    listobject         = itab_list
  EXCEPTIONS
    empty_list         = 1
    list_index_invalid = 2
    OTHERS             = 3.
IF sy-subrc NE '0'.
  WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
ENDIF.

Similar Messages

  • How to read list_to_asci

    I  used FM  LIST_TO_ASCI  to get entire report output. Now my requirement is to read only particular column from that  whole report output.
    im getting output as
    |        period      |debit          |balance
              1               300            4000
              2               600            6000
    how can i read column |balance only and all values under it..

    Hi,
    If you know the lendth of your fields you cando this,
    Lets say your three fields are length 2,4, and 10 respectively
    loop at table.
    wrtie: / table+6(10).
    endloop.
    This would display the blance field values only.
    thanks.
    JB

  • Getting Values of MMBE transaction

    Hello all,
         I need to get the Values of the MMBE transaction and use those values in my report for calculation. Can anybody suggest a way to execute the MMBE tranasaction from my report and get the values in a  table.
    Regards,
    Vijayakumar

    Vijay,
    Submit MMBE program in your zprogram by passing the values to the MMBE selection screen for ex
    SUBMIT MMBE Program WITH p_werks = p_werks
    EXPORTING LIST TO MEMORY AND RETURN.
    and then use
    LIST_FROM_MEMORY
    LIST_TO_ASCI
    LIST_FREE_MEMORY
    Or copy MMBE program as zmmbe and then use EXPORT IMPORT concept to get the final internal table values into your zprogram.
    K.Kiran.

  • ALV Report to be send as a mail as an Excel sheet attachment

    Hi,
             I have designed a Report that has the mailing functionality by attaching the ALV report output in the Excel sheet.
    1. I am using SUBMITT PROGRAM....EXPORTING MEMORY ID.
              Here  I am retrieving the required ALV report.
    2. I am passing of ALV Report output to internal table, say XLS_TAB using FM LIST_TO_ASCI.
    I can see the data in the internal table. But the problem is when the report output has many columns (i.e) greater than 255 Char, the columns get truncated(data is missed).
    So, how to prevent the missing of the columns. I don't want split each record into new line. Because, when it is passed to Excel, each record should be in a single line without missing any column.
                   If you say the FM can be valid upto 255 Char, what can be the alternative solution?
    Immediate response is appreciated.
    Thanks for your help.
    Sravan.

    Hi deepan
    DESCRIBE TABLE objtxt LINES tab_lines.
      READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ) . <---- make it 1024 instead of 255
      CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = gv_tab_lines.
    objpack-doc_type = RAW
      APPEND objpack
    then looping contents of the final table to OBJBIN1.
    DESCRIBE TABLE objbin1 LINES tab_lines.
      objpack-doc_size = tab_lines * 255 .    <-------- make it has 1024 instead of 255
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num = 1.
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
      objpack-doc_type = .XLS
      APPEND objpack.
    Regards
    vijay

  • SUBMIT...ALV

    Hello,
      I am calling zreport1 giving alvlistoutput in background using SUBMIT zreport1  and return from another zreport. After generating spool output i want the itab alv contents obtain in reuse_alv_list_display to be displayed in zreport. I tried through EXPORT/IMPORT itab, but not getting result.
    Please help!
    Thanks.

    Hi Uma,
    First you need to execute second report using SUBMIT statement like...
    SUBMIT  zreprt1 WITH role = 'X'
                            WITH f_role IN r_role
                            WITH fdate EQ fdate
                            WITH tdate EQ tdate
            EXPORTING LIST TO MEMORY
                AND RETURN.
    Then use FM LIST_FROM_MEMORY to export the data from memory to abaplist internal table.
    Then use FM LIST_TO_ASCI to convert data into ASCII format and then modify the table content got from above FM according to your requiremant.
    Thanks
    Nitesh

  • Read spool data and send it through e-mail as .txt or .xls attachment

    Hi All,
    I have to read the spool data and send it via e-mail as .txt or .xls attachment. I have used FMs LIST_TO_ASCI, RSPO_RETURN_SPOOLJOB and SO_SOLITAB_TO_SOLIXTAB. I am using FM SO_DOCUMENT_SEND_API1 to send e-mail.
    My problem is, the text file being sent is not showing entire data. It's getting truncated after 255 characters. Is this a standard? If yes, then is there any work around for it?
    Alternatively, I can send the file as excel attachment. How can this be done?
    Thanks,
    Ashwini

    You will have to convert string to Xstring and then to binary to acheive this.
    Check this wiki to send a mail attachment with more than 255 characters.
    [https://wiki.sdn.sap.com/wiki/display/Snippets/Tosendamailattachmentwithmorethan255charactersinaline]
    Vikranth

  • Problems after using LIST_TO_ASCI

    Hi Experts ,
    i am facing an uphill task after using the Function Module LIST_TO_ASCI.
    CALL FUNCTION 'LIST_TO_ASCI'
       EXPORTING
         list_index               = -1
       WITH_LINE_BREAK          = ' '
    IMPORTING
       LIST_STRING_ASCII        = list_string
      LIST_DYN_ASCII           =
      TABLES
         listasci                 = ascitab
         listobject               = list_tab
    EXCEPTIONS
      EMPTY_LIST               = 1
      LIST_INDEX_INVALID       = 2
      OTHERS                   = 3
    I use this function as above .
    Now the values in the ascitab are in string format
    i used submit report for FS10N transaction .
    Now after submit
    then LIST_FROM_MEMORY'
    then LIST_TO_ASCII
    i get the value in string
    now my problem is that it displays exactly how *fs10n* dispalys the whole output
    i want only the last field value .
    that is the cumlative  balance value that is practially speaking the last field in the FS10N report .
    How can i achieve that using this ASCITAB table obtained from LIST_TO_ASCI

    Hi Experts ,
    i am facing an uphill task after using the Function Module LIST_TO_ASCI.
    CALL FUNCTION 'LIST_TO_ASCI'
       EXPORTING
         list_index               = -1
       WITH_LINE_BREAK          = ' '
    IMPORTING
       LIST_STRING_ASCII        = list_string
      LIST_DYN_ASCII           =
      TABLES
         listasci                 = ascitab
         listobject               = list_tab
    EXCEPTIONS
      EMPTY_LIST               = 1
      LIST_INDEX_INVALID       = 2
      OTHERS                   = 3
    I use this function as above .
    Now the values in the ascitab are in string format
    i used submit report for FS10N transaction .
    Now after submit
    then LIST_FROM_MEMORY'
    then LIST_TO_ASCII
    i get the value in string
    now my problem is that it displays exactly how *fs10n* dispalys the whole output
    i want only the last field value .
    that is the cumlative  balance value that is practially speaking the last field in the FS10N report .
    How can i achieve that using this ASCITAB table obtained from LIST_TO_ASCI

  • How to use 'Submit' for Program rpsinfo (tcode:cn41n)

    Hi Friends,
    CN41N is a Hierarchical report of PS Module. Which displays WBS, Network, Project details in Hierarchical view. I want to store the output of this report in internal table for further processing. For this i am using the following code .
    SUBMIT  rpsinfo
       WITH cn_pspnr-low EQ 'S-0018-01-01-01-01-001'
       EXPORTING LIST TO MEMORY AND RETURN .
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = list_tab
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      DATA: BEGIN OF i_asci OCCURS 0,
           data1(5000) TYPE c,
           END OF i_asci.
      CALL FUNCTION 'LIST_TO_ASCI'
    * EXPORTING
    *   LIST_INDEX               = -1
    *   WITH_LINE_BREAK          = ' '
    * IMPORTING
    *   LIST_STRING_ASCII        =
    *   LIST_DYN_ASCII           =
       TABLES
         listasci                 = i_asci
         listobject               = list_tab
       EXCEPTIONS
         empty_list               = 1
         list_index_invalid       = 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.
    The above code is not working. Output is not going to memory. But this is working with all other reports which are simple ALV Reports. I think since  rpsinfo (tcode:cn41n) is hierarchical report it is not displaying output. Then how do i send the output to the memory. Please suggest the solution.
    Thanks in Advance.
    Mahender.

    if the hierarchical report is displayed using SAP Graphics, then you will never be able to get information from memory because the output is not stored into a SAP list

  • Reg: ALV output download using excel option

    Hi Team,
    I  created  a report using ALV Function modules, I want to download in  Excel sheet the  output list. i am trying to download but i am not getting proper values. I am populating around 50 fileds.
    is there any settings for these download.
    <<removed by moderator>>
    Thanks & Regards,
    Mahendar patha.

    hi mahendra;
    use this step-by-step procedure it will help u a lot:
    Firstly export  the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    Regards
    Rahul sharma
    Edited by: RAHUL SHARMA on Nov 4, 2008 1:22 PM

  • Want to use ouput of a report in my program

    Hi all,
          I want to use the output of report rm07mlbd(stock on posting date) in my report program. How do I get the same done.

    Hi Kaushal,
    Follow this logic if you want to use the output
    *--> Submit VL04 Report and store output in Memory
        SUBMIT rv50sbt1
                WITH vstel   EQ lw_vstel
                WITH s_ledat IN lr_ledat
                WITH s_ebeln IN lr_ebeln
                WITH allea   EQ lw_allea
                WITH alleb   EQ lw_alleb
                WITH samml   EQ lw_samml
                WITH anzei   EQ lw_anzei
                EXPORTING LIST TO MEMORY
           AND RETURN.
        IF sy-subrc NE 0.
          MOVE text-e09 TO ztastolog-zerrmsg.
          PERFORM insert_message USING c_chare text-i09.
          EXIT.
        ENDIF.
    *-->  Import List output from Memory
        CALL FUNCTION 'LIST_FROM_MEMORY'
          TABLES
            listobject = lt_list
          EXCEPTIONS
            not_found  = 1
            OTHERS     = 2.
    *--> Convert list output to ASCI format
        CALL FUNCTION 'LIST_TO_ASCI'
          TABLES
            listasci           = lt_asci
            listobject         = lt_list
          EXCEPTIONS
            empty_list         = 1
            list_index_invalid = 2
            OTHERS             = 3.
    *--> Free Memory
        CHECK sy-subrc EQ 0.
        CALL FUNCTION 'LIST_FREE_MEMORY'
          TABLES
            listobject = lt_list.
    Thanks,
    Vinay

  • Send mail using CL_BCS through function module, run in background task.

    Hi,
    I am running a function module in Background task. in this function module I am sending mail using CL_BCS class.
    but mail is not generated. if I run the same function Module in foreground mail generated successfully....
    can anyone please tell me the reason behind this.

    Hi i realise that The LIST_TO_ASCII thing is not working correctly in background because the the list-processing in beckground is working not the same as in dialog i think.
    I can only get the last page of the list out when running in background. Any solution to this?
    my code:
        CALL FUNCTION 'LIST_TO_ASCI'
             EXPORTING
                  list_index         = sy-lsind
             TABLES
                 list_dyn_ascii = downtab
             EXCEPTIONS
                  empty_list         = 1
                  list_index_invalid = 2
                  OTHERS             = 3.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
    Thanks ,
    LH

  • Report output list to internal table using submit report

    Hello,
    I have a report that generates the output in the form of an abap list. I want this data in an internal table for further processing. the report internally does not do a export data to memory so i cannot use import later on to get the data.
    i did the following
    SUBMIT <report name> exportING LIST TO MEMORY and return.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = ascitab
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    This returns the data in the ascitab, but the data contains additional unwanted info like lines and hyphens etc. Also the data is in a table with a single column, so pulling out individuals fields is again an issue. Is there a way to get this data into an internal table directly?
    best regards,
    Suraj

    hi suraj
    export the internal table  of report
    DATA: BEGIN OF SR_VBAK ,
          VBELN LIKE VBAK-VBELN,
          END OF SR_VBAK.
    DATA: IR_VBAK LIKE STANDARD TABLE OF SR_VBAK WITH HEADER LINE.
    EXPORT IR_VBAK TO MEMORY ID 'SALES'.
           SUBMIT <program name in which u want internal table records > AND RETURN.
    now import that data in submit program  .
    here u have to creat a internal table with same structure as the internal table from which u r trying to export the data
    DATA: BEGIN OF SR_VBAK,
          VBELN LIKE VBAK-VBELN,
          END OF SR_VBAK.
    DATA : IR_VBAK LIKE STANDARD TABLE OF SR_VBAK WITH HEADER LINE.
    IMPORT IR_VBAK FROM MEMORY ID 'SALES'.
    regards
    ANIL CHAUDHaRY

  • Problem while using submit

    I try to implement a senario . one is to output some data, another is used to execute the former one,   import the result into memory, then read the data.  but I can't get the correct code for submit? could you please give me a hand ?
    REPORT  ZGUO.
    tables: vbak.
    types:   begin of w_vbak,
                 VBELN     like vbak-VBELN,
                 AUART    like vbak-AUART,
               end of w_vbak.
    data:  t_vbak type w_vbak occurs 0 with header line.
    select-options : S_VBELN FOR vbak-VBELN obligatory.
    select-options : S_AUART FOR vbak-VBELN .
    select * from vbak into corresponding fields of table t_vbak
    where VBELN in S_VBELN.
    *  where VBELN in S_VBELN and AUART in S_AUART.
    write: sy-subrc , /.
    loop at t_vbak.
      write: t_vbak-VBELN, / t_vbak-AUART , /.
    endloop.
    ******************program 2*********************
    *& Report  ZGUO1
    REPORT  ZGUO1.
    DATA: seltab type table of rsparams,
        seltab_wa like line of seltab.
        seltab_wa-selname = 'S_VBELN'.
        seltab_wa-sign = 'I'.
        seltab_wa-option = 'EQ'.
        seltab_wa-low = '4969'.
        append seltab_wa to seltab .
    **    SUBMIT ZGUO   with selection-table seltab via SELECTION-SCREEN .
    **SUBMIT ZGUO and return.
    ** SUBMIT ZGUO via SELECTION-SCREEN .
    *submit ZGUO .
    DATA  BEGIN OF itab_list OCCURS 0.
            INCLUDE STRUCTURE abaplist.
    DATA  END OF itab_list.
    DATA: BEGIN OF vlist OCCURS 0,
            filler1(01)   TYPE c,
            field1(06)    TYPE c,
            filler(08)    TYPE c,
            field2(10)    TYPE c,
            filler3(01)   TYPE c,
            field3(10)    TYPE c,
            filler4(01)   TYPE c,
            field4(3)     TYPE c,
            filler5(02)   TYPE c,
            field5(15)    TYPE c,
            filler6(02)   TYPE c,
            field6(30)    TYPE c,
            filler7(43)   TYPE c,
            field7(10)    TYPE c,
          END OF vlist.
    *SUBMIT ZGUO EXPORTING LIST TO MEMORY and return with selection-table seltab.
    *SUBMIT ZGUO EXPORTING LIST TO MEMORY with selection-table seltab.
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = vlist
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    IF sy-subrc NE '0'.
      WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
    ENDIF.
    ***************program 2*********************
    some piece of program is copied directly from internet, but as I tried to exceute the second program, I got some error. could you please help to tell where I am wrong?
    Thank you very much!!!
    Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 10:45 AM

    Hi
    Please be clear of which program you want to submit.
    One program is known as Called Program and the other Calling Program.
    This is a straight forward process.
    Use Key word SUBMIT . For more info take F1 help on the key word
    if you want to pass data from one program to other you can use  key words
    IMPORT and EXPORT
    The Key word help very clear and Self Explanatory
    IF you find any syntax error, the F1 help is always there to help you and moreover the syntax check helps you aswell
    Regards
    Ramchander Rao.K
    Edited by: Ramchander Krishnamraju on Dec 26, 2008 10:56 AM

  • Error with FM LIST_TO_ASCI

    Hi Gurus,
    I'm trying to get the output of report ME2N into a internal table and then add five more fileds to it and generate the output in an ALV format.
    While running the program i'm getting errror in the FM LIST_TO_ASCI. Below is the runtime error message i get:
    Error analysis
        For the statement
           "DESCRIBE"
        only flat, character-type data objects are supported at the argument
        position "LISTASCI".
        In this case, the operand "LISTASCI" has the non-character-type or non-flat
        type "u". The current program is a Unicode program. In the Unicode
        context, the type 'X' or structures containing not only character-type
        components are regarded as non-character-type.
    This dump is thrown at the statement:
    If listasci is supplied
    describe field listasci length ascisize in character mode.
    Please suggest how i'll overcome this error.
    Below is the code i have written:
    SUBMIT RM06EN00 EXPORTING LIST TO MEMORY AND RETURN.
        CALL FUNCTION 'LIST_FROM_MEMORY'
                    TABLES
                      LISTOBJECT       = IT_LIST
                   EXCEPTIONS
                     NOT_FOUND        = 1
                     OTHERS           = 2
                  IF SY-SUBRC <> 0.
                  case sy-subrc.
                       WHEN 1.
                       MESSAGE 'LIST NOT FOUND' TYPE 'E'.
                       WHEN 2.
                       MESSAGE 'ERROR MESSAGE' TYPE 'E'.
                ENDCASE.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                  ENDIF.
    CALL FUNCTION 'LIST_TO_ASCI'
                   EXPORTING
                     LIST_INDEX               = -1
                     WITH_LINE_BREAK          = ' '
                  IMPORTING
                    LIST_STRING_ASCII        =
                    LIST_DYN_ASCII           =
                   TABLES
                     LISTASCI                 = IT_LIST1
                     LISTOBJECT               = IT_LIST
                   EXCEPTIONS
                     EMPTY_LIST               = 1
                     LIST_INDEX_INVALID       = 2
                     OTHERS                   = 3
    IF SY-SUBRC <> 0.
    case sy-subrc.
      WHEN 1.
      MESSAGE 'UNABLE TO CONVERT DATA' TYPE 'E'.
    ENDCASE.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Please suggest.... As this is a critical issue. Thanks in advance

    Hi,
    Check the value you are passing for LGTYP (storage type ) in the table T301 Check table for LGTYP field.
    Use fm : ENQUEUE_ELLAGPE , DEQUEUE_ELLAGPE
    before using that fm to lock and unlock.
      CALL FUNCTION 'ENQUEUE_ELLAGPE'             
    XPORTING                                      
         mode_lagp            = 'E'               
         mandt                = sy-mandt          
         lgnum                = v_lgnum           
         lgtyp                = tbl_toitem-vltyp  
         lgpla                = v_lgpla_lock      
      X_LGNUM              = ' '                  
      X_LGTYP              = ' '                  
      X_LGPLA              = ' '                  
      _SCOPE               = '2'                  
      _WAIT                = ' '                  
      _COLLECT             = ' '                  
    XCEPTIONS                                     
         foreign_lock         = 1                 
         system_failure       = 2                 
         OTHERS               = 3.                
    And also check combination of values possible
    Regds
    Sivaparvathi
    Please reward points if helpful...
    Edited by: Siva Parvathi on Jan 2, 2008 12:33 PM

  • How to use the internal table of the submitted program

    Hi,
    In the main program i have submitted a program and that program is running  successfully and data is populated in to it_final, now i want to use this data populated internal table it_final in my main program.
    Thanks,
    Sudhakar.

    Hi,Mathew,
    *& Report  ZMB51                                                       *
    REPORT  ZMB51                                   .
    DATA LIST_TAB TYPE TABLE OF ABAPLIST.
    DATA: BEGIN OF olist OCCURS 0,
            filler1(1500)   TYPE c,
          END OF olist.
    submit <b>RM07DOCS</b> EXPORTING LIST TO MEMORY
                     AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        LISTOBJECT = LIST_TAB
      EXCEPTIONS
        NOT_FOUND  = 1
        OTHERS     = 2.
    IF SY-SUBRC = 0.
      CALL FUNCTION 'LIST_TO_ASCI'
        EXPORTING
          LIST_INDEX         = -1
        TABLES
          LISTASCI           = oLIST
          LISTOBJECT         = LIST_TAB
        EXCEPTIONS
          EMPTY_LIST         = 1
          LIST_INDEX_INVALID = 2
          OTHERS             = 3.
    BREAK-POINT.
    write:/ sy-subrc.
    ENDIF.
    OLIST will contain the report output that you have executed but you need to tweak this internal table so that it can be used for further processing.The current example will get you MB51 output into OLIST,so change the program name to your program name at the SUBMIT statement and then try.
    K.Kiran.

Maybe you are looking for

  • Time machine restore stuck on filevault password screen

    I have a new macbook pro.  I am trying to restore from a backup on timemachine through migration assistant.  The problem is that the backup is too big to fit on this new computer's storage, so it attempts to do it and then fails.  which is fine, beca

  • Budgeting in private organisation

    HELLO ALL MY CLIENT IS A PRIVATE ORGANISATION, BUT THEY HAVE FUNCTIONS OF BUDGETING. WE ARE USING MYSAP2005 WITH ENHANCEMANCE PACK 4 . THEY HAVE CONTROL OF BUDGET AT THE TIME OF PROCUREMENTS AND EXPENSES. THEY HAVE PURCHASE BUDGET , EXPENDITURE BUDGE

  • Could somebody tell me how this program works....

    Hi, I am new in Java...I just bought a book and start to learn the java from that book. Here is one of the project exercise and seems that it is difficult for me to understand the flow of the program. class HelpClassDemo { public static void main(Str

  • Some comments show as XML markup?

    In a few documents that are shared for review, some of the comments look like code, how do I correct this?

  • Select command for 2 dimensions

    Hi All, Can we use Select command for query from 2 dimensions ? or how to do the query using script logic ?? any suggession ?? Here's the expand parameters : ROW                     ROW OTHERDTLS     PROCESS BASMEMBERS     BASMEMBERS AND FSG <> ""