How can I Export dynamic table to bapi,  which is imported from BAPI.

At first time execution of BAPI , I am getting Items(Table formate) . Again I have export these Items to BAPI. As a Input Table. How can transfer data export table to import table.
And also I need delete some items, which are come form bapi. Then I need to export .
Any body can help me to achieve this issue.
<b>EX.   At first execution of BAPI, I am getting items in one out structure. After that I need to execute same BAPI using these items.</b>

You'll have to *alias* your columns, not prefix it with the table names:
$[CHE_TEST@asterix1_impl] r
  1  declare
  2    cursor cData is
  3      with data as (
  4        select 1 id, 'test1' val1, 'a' val2 from dual
  5        union all
  6        select 1 id, '1test' val1, 'b' val2 from dual
  7        union all
  8        select 2 id, 'test2' val1, 'a' val2 from dual
  9        union all
10        select 2 id, '2test' val1, 'b' val2 from dual
11      )
12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
13      from data a, data b
14      where a.id = b.id
15      and a.val2 = 'a'
16      and b.val2 = 'b';
17  begin
18    for rData in cData loop
19      null;
20    end loop;
21* end;
  for rData in cData loop
ERROR at line 18:
ORA-06550: line 18, column 3:
PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
ORA-06550: line 18, column 3:
PL/SQL: Statement ignored
$[CHE_TEST@asterix1_impl] r
  1  declare
  2    cursor cData is
  3      with data as (
  4        select 1 id, 'test1' val1, 'a' val2 from dual
  5        union all
  6        select 1 id, '1test' val1, 'b' val2 from dual
  7        union all
  8        select 2 id, 'test2' val1, 'a' val2 from dual
  9        union all
10        select 2 id, '2test' val1, 'b' val2 from dual
11      )
12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
13      from data a, data b
14      where a.id = b.id
15      and a.val2 = 'a'
16      and b.val2 = 'b';
17  begin
18    for rData in cData loop
19      null;
20    end loop;
21* end;
PL/SQL procedure successfully completed.
cheers

Similar Messages

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • How Can I Export A Table With Its Entries ( values )

    Hi guys,
    How can i export a table with the entries that the table is populated with ??!!
    Best Regards,
    Fateh

    To export a table and its data you can do it a number of ways.. Do you have access to SQL Developer? If not you can do it through the APEX SQL Workshop..
    Under SQL Workshop, Utilities, Data Unload, To text (or XML, whichever you are more comfortable with..).. Select your schema, click next button, select the table, click next, select the columns you want exported (select ALL ITEMS in the select List), click next, on optionally enclosed by I usually enter a " (Sometimes I have long strings in columns), click the include column names checkbox to get the column names at the top of the document, click unload data button..
    To get the ddl (code to build table) Sql Workshop, utilities, generate ddl, create script, select schema, select next, click table checkbox, select next, click the checkbox of table you want to get ddl for...
    Thank you,
    Tony Miller
    Webster, TX
    There are two kinds of pedestrians -- the quick and the dead.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • HT4623 how can i use one i5 in oman which is bought from australia?

    how can I use my i5 in oman which is bought from Australia?

    Hi,
       I put new sim card (omantel -prepaid) but some msgs. is came.( The sim card that you currently have installed in this phone is from a carrier that is not supported under the activation policy that is currently assigned by the activation server. This is not a hardware issue with the I phone.Please insert another SIM card from a supported carrier  or request that this I phone be un locked by your carrier.Please contact Apple for more information ).

  • How can I keep tabs on the file size when importing from the Event Library into a Project? I want to ensure the movie will fit onto a 4.7Gb disc?

    How can I keep tabs on the file size when importing from the Event Library into a Project? I want to ensure the movie will fit onto a 4.7Gb disc?

    iDVD does not care about file sizes, as it compresses the file to the standard DVD format of mpeg2.
    It only cares about length i.e. max 2 hours including titles etc.
    iDVD encoding settings:
    http://docs.info.apple.com/article.html?path=iDVD/7.0/en/11417.html
    Short version:
    Best Performance is for videos of up to 60 minutes
    Best Quality is for videos of up to 120 minutes
    Professional Quality is also for up to 120 minutes but even higher quality (and takes much longer)
    Professional Quality: The Professional Quality option uses advanced technology to encode your video, resulting in the best quality of video possible on your burned DVD. You can select this option regardless of your project’s duration (up to 2 hours of video for a single-layer disc and 4 hours for a double-layer disc). Because Professional Quality encoding is time-consuming (requiring about twice as much time to encode a project as the High Quality option, for example) choose it only if you are not concerned abo
    In both cases the maximum length includes titles, transitions and effects etc. Allow about 15 minutes for these.
    You can use the amount of video in your project as a rough determination of which method to choose. If your project has an hour or less of video (for a single-layer disc), choose Best Performance. If it has between 1 and 2 hours of video (for a single-layer disc), choose High Quality. If you want the best possible encoding quality for projects that are up to 2 hours (for a single-layer disc), choose Professional Quality. This option takes about twice as long as the High Quality option, so select it only if time is not an issue for you.
    Use the Capacity meter in the Project Info window (choose Project > Project Info) to determine how many minutes of video your project contains.
    NOTE: With the Best Performance setting, you can turn background encoding off by choosing Advanced > “Encode in Background.” The checkmark is removed to show it’s no longer selected. Turning off background encoding can help performance if your system seems sluggish.
    And whilst checking these settings in iDVD Preferences, make sure that the settings for NTSC/PAL and DV/DV Widescreen are also what you want.
    http://support.apple.com/kb/HT1502?viewlocale=en_US

  • How can I export slideshows created in Aperture v3.3.2 from Mid-2009 MacBook Pro-17 to blank DVDs?

    (Fifth futile attempt in two hours, before I learned there was a Post webpage – I’m new to ApSuppCom - and after I learned that I am not allowed to update previous content, so I had to back out, make a few changes, and start over.)  How can I export slideshows created in Aperture v3.3.2 (complete with superimposed captions and music tracks) from Mid-2009 MacBook Pro-17 to blank DVDs ?  (Some other specs: Mac OS Lion 10.7.5; Capacity 499.5 GB;  Processor 2.8 GHz Intel Core  2 Duo; Memory 4GB 1067 MHz DDR3; Graphics NVIDIA GeForce 9400M 256MB)
    I cannot do a copy (export) without various error messages appearing and the inevitable stoppage occurring.  Always with the DVD Video Player final message reading, “Supported disc not available.” Advisors and Mac Geniuses at local Apple Stores have told me to try Roxio Toast.  When I visited the Roxio website, and found numerous other company products, the descriptions all seemed to suggest that most of the apps shown can easily export videos to DVDs, but nothing was said about finished digital slide shows being exported.  At future events soon,  I hope to be handing out these finished DVDs (free) to the people in them.   Any help will be greatly appreciated. A.Z.

    How can I export slideshows created in Aperture v3.3.2 (complete with superimposed captions and music tracks) from Mid-2009 MacBook Pro-17 to blank DVDs ?
    Aperture cannot burn slideshows to a DVD.  It only can export a video of your slideshow.
    In Aperture 3 you use the "Export" button in Aperture's slideshow project to render a video to a folder on your disk.
    Then you use iDVD or another program to burn a video DVD.
    I cannot do a copy (export) without various error messages appearing and the inevitable stoppage occurring.  Always with the DVD Video Player final message reading, “Supported disc not available.”
    Could you please describe the exact steps that are causing these error messages?
    How are you exporting your slideshow from Aperture? Which settings are you using? And how are you importing the video to iDVD or Toast to burn a video DVD?
    For more suggestions see Karsten Schlüter's user tip: How to create a video-DVD? (Macs without iDVD)

  • How to place multiple column tables in InDesign Layout by importing from XML

    Hi,
    I've an XML file that I need to import into InDesign Document. All the cell elements from Table tag  turn out be a "single column Table"..! How do I place a 2x2 or 3x2 tables in InDesign document while importing from an XML?
    Please help..!
    Thanks,
    Basav

    I might note that I am using InDesign CS 5, and importing from a document stored in docx format.

  • How can I export an SD 16:9 self contained file from FCX?

    Hi folks,
    I'm playing with the trial.  Used another thread to figure out how to import mts files (Loving the fact I don't have to clipwrap them!
    Original footage is in HD - 1920 x 1080.  Upon importing it looks like it converts to ProRes422 1440 x 1080 - is that correct?
    Regardless, my client doesn't want blu ray. They want DVD and I used BitVice to compress mpeg2s (much better than compressor 3 for quality imho).
    Plus, I don't want to pay for compressor 4 or x (whatever it's called).
    I've tried Share - Export Media, but can't see any option for outputting to an SD file (720x480 16:9) ?
    Thanks in advance for reading and possibly helping me out!
    Cheers,
    Keebler

    Original footage is in HD - 1920 x 1080.  Upon importing it looks like it converts to ProRes422 1440 x 1080 - is that correct?
    No, that's not correct, but it depends on the exact type of HD media and your import settings.
    You can't export to that without compressor 4. You'll have to export a ProRes master and take that to BitVice.

  • How can I export a pdf of an InDesign alternate layout from a book?

    Hello:
    I have a book that is in a 6×9″ layout and I would like to make an alternate layout for 8.5×11 (and other formats) then export both as independent books to PDFs. How can I do this or is there another better way? I thought alternate layout would be the way to go, but I don’t think I can export the alternate layouts for all my chapters/etc., from the book menu without including ALL the pages from each layout?
    Thanks for any direction or advice!
    Kevin

    Hi Willi:
    Thanks for your prompt response.  Do you know if there are any scripts that can do this or at least help automate some of this process?
    Thanks!
    Kevin

  • How can I export a graphic slide with a quicktime movie from Keynote?

    I export a title slide with a quicktime movie from Keynote to my desktop and it plays fine with audio. Once I insert or drag the clip into iWeb the resolution is degraded and very choppy. The resolution is 320x200 and I'm exporting from Keynote as a custom size (320x200) Frame rate: 29.97 Key Frames: Automatic Key Reordering is checked Data Rate: Automatic Quality: Multi pass. I need some help.

    how large is the video and if you publish - does it still have the same horrible quality?
    you might considering exporting as flash (loads faster) and integrating that into your iweb site using post-editing: http://karreth.com/index.php/articles/iframes-iweb/
    max

  • How to pass the Dynamically table name and RELID in IMPORT  x TO y FROM DATABASE dbtab(ar) ID Key

    Hello Expert,
    I wanted to know is there any way through which we can dynamically pass the table name in IMPORT condition.
    For e.g.
    DATA : PCLT TYPE DD03L-TABNAME.
    DATA: SET_RELID TYPE T52RELID-RELID.
    DATA: key TYPE PCLKEY.
    DATA: text_version TYPE PVRSN.
    DATA: BEGIN OF ptext OCCURS 132.
    DATA: line(132).
    DATA: END OF ptext.
    SET_RELID = 'TX'.
    PCLT = 'PCL1'.
    KEY = '00001000004005     9999123119960101000'.
    TEXT_VERSION = '01'.
    IMPORT TEXT_VERSION PTEXT FROM DATABASE <PCLT>(<SET_RELID>) ID KEY.
    If i use this then it gives me error message "The Dictionary structure or table "<PCLT>" is either not active or does not exist."
    Kindly help me in this matter.
    Thanks
    Srikanth

    Hi Srikanth
    I dont know if there is another solution, but this is what i did using a dynamic subroutine, please check it
    just add this lines to your code
    DATA: prog  TYPE c LENGTH 8,
           mess TYPE string,
           sid  TYPE string,
           wrd  TYPE string,
           dir  TYPE trdir,
           OFF(3).
    DATA: lt_code TYPE TABLE OF rssource-line.
    DATA: ls_code TYPE rssource-line.
    perform call_import using pclt set_relid key.
    form call_import USING p_pclt p_set_relid p_key.
       ls_code = 'PROGRAM SUBPOOL.'.
       append ls_code to lt_code.
       ls_code = 'form get_text tables ptext using p_key changing text_version.'.
       append ls_code to lt_code.
       ls_code = 'IMPORT text_version ptext from database'.
       append ls_code to lt_code.
       concatenate p_pclt '(' p_set_relid ')' into ls_code.
       append ls_code to lt_code.
       ls_code = 'id p_key.'.
       append ls_code to lt_code.
       ls_code = 'endform.'.
       append ls_code to lt_code.
       generate subroutine pool lt_code
                           name prog
                           message mess
                           SHORTDUMP-ID sid
                           WORD WRD
                           OFFSET OFF.
       IF SY-SUBRC EQ 0.
         perform GET_TEXT IN PROGRAM (prog) tables ptext
                                              USING p_key
                                              CHANGING text_version .
       ENDIF.
    endform.
    Hope this help
    Regards
    MC

  • HOw can I get my address book, in Lion, to import from version 5.0.3?

    I am trying to import my address book from version 5.0.3 to my new Lion, via flash drive.  Lion won't open the file.  How do I upgrade it?

    This would do the trick, thanks.  However, I solved it by making sure that the MacBook that the Address Book was on had Lion, too.  Then, I exported the entries to the Flash Drive and it worked perfectly, seamlessly.  The Lion didn't cost me because I had a few extra installs to use.

  • How can I safely convert CR2 files to DNG after Import from catalog

    Images on my laptop from 2 photoshoots in the studio today were EXPORTED from laptop as catlog and imported to desktop as catalog.
    I imported without moving the files anywhere since I was instructed to move that folder to its final resting place.
    The 125 images were importred into LR4 but I see they are still CR2 files.
    Is there a way to convert these guys to DNG inplace? or is it safe to re-import these. I don't want the side car gig.

    Convert to DNG (Library Menu) - do not re-import.

  • How can I increase the volume on an audio track imported from a GarageBand project, beyond the  11

    I have an audio track, mp3, originally recorded in GarageBand, but with an recording level set too low.  I've now adjusted the volume in the audio track to the max, but during playback it's still rather quiet.  I have to turn the volume on my Mac to the max to have it at an acceptable playback level.  Is the any why to increase the volume on that track any further?

    http://www.fcpbook.com/Audio1.html

  • How can we export table data to a CSV file??

    Hi,
    I have the following requirement. Initially business agreed upon, exporting the table data to Excel file. But now, they would like to export the table data to a CSV file, which is not being supported by af:exportCollectionActionListener component.
    Because, when i opened the exported CSV file, i can see the exported data sorrounded with HTML tags. Hence the issue.
    Does someone has any solution for this ... Like, how can we export the table data to csv format. And it should work similar to exporting the data to excel sheet.
    For youre reference here is the code which i have used to export the table data..
    ><f:facet name="menus">
    ><af:menu text="Menu" id="m1">
    ><af:commandMenuItem text="Print" id="cmi1">
    ><af:exportCollectionActionListener exportedId="t1"
    >title="CommunicationDistributionList"
    >filename="CommunicationDistributionList"
    >type="excelHTML"/> ---- I tried with removing value for this attribute. With no value, it did not worked at all.
    ></af:commandMenuItem>
    ></af:menu>
    ></f:facet>
    Thanks & Regards,
    Kiran Konjeti

    Hi Alex,
    I have already visited that POST and it works only in 10g. Not in 11g.
    I got the solution for this. The solution is :
    Use the following code in jsff
    ==================
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="text/csv; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    OR
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="application/vnd.ms-excel; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    And place this code in ManagedBean
    ======================
    > public void test(FacesContext facesContext, OutputStream outputStream) throws IOException {
    > DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    >DCIteratorBinding itrBinding = (DCIteratorBinding)dcBindings.get("fetchDataIterator");
    >tableRows = itrBinding.getAllRowsInRange();
    preparaing column headers
    >PrintWriter out = new PrintWriter(outputStream);
    >out.print(" ID");
    >out.print(",");
    >out.print("Name");
    >out.print(",");
    >out.print("Designation");
    >out.print(",");
    >out.print("Salary");
    >out.println();
    preparing column data
    > for(Row row : tableRows){
    >DCDataRow dataRow = (DCDataRow)row;
    > DataLoaderDTO dto = (DataLoaderDTO)dataRow.getDataProvider();
    >out.print(dto.getId());
    >out.print(",");
    >out.print(dto.getName());
    >out.print(",");
    >out.print(dto.getDesgntn());
    >out.print(",");
    >out.print(dto.getSalary());
    >out.println();
    >}
    >out.flush();
    >out.close();
    > }
    And do the following settings(*OPTIONAL*) for your browser - Only in case, if the file is being blocked by IE
    ==================================================================
    http://ais-ss.usc.edu/helpdoc/main/browser/bris004b.html
    This resolves implementation of exporting table data to CSV file in 11g.
    Thanks & Regards,
    Kiran Konjeti

Maybe you are looking for

  • Drag and Drop- Can it be used in a responsive project?

    The drag and drop interaction is not clickable in a responsive project, is there a way I can still use it? I have tried to copy and paste it, but it doesn't work very well...

  • Shipping point calendar

    Hi all, I am having scenario where factory calendar is having 5 weekdays. However due to this deliveries can not be picked and delivered on Sat and Sun. Schedule line could not pick the dates on saturday and sunday. To resolve this we have two option

  • Problem with time zone

    i want my time on the ipad to be GMT but it keeps going back to EDT and my calendar alerts are off mark. i need help badly!!!!!!

  • I can reply or forward a message but i cannot create a new message

    I can reply or forward a message but i cannot create a new message

  • Registring SAP 4.0B in SDL

    Hi Everybody. Till now, I registered my SAP Systems (ECC 5.0, BW 3.5, etc.) in SLD using RZ70, like in Michal's blog /people/michal.krawczyk2/blog/2005/03/10/registering-a-new-technical-system-in-sld--abap-based Now, I have to register an old SAP 4.0