Help with logic on internal table

Hi SDNers,
I have 1st internal table call table it_tab with 20 fields. This table stores the data which will be passed to BDC.
I have the 2nd internal table call table it_header. At run-time this table will store the header fields to be passed to BDC.
The requirement is, when calling BDC I need to pass data from it_tab by group, each group must have the same data for the header fields. We only know which field is header field at run-time.
Because ABAP does not support delete internal table with dynamic WHERE clause so my current solution does not work.
Please let me know your idea.
Thanks,
Khanh

you may have to run some nested loops & try to find solution using Field Symbol. This is discussed many time in forum but unfortunately no direct solution.
Re: Dynamic where clause for LOOP AT internal table

Similar Messages

  • Logic inside internal table

    hello all,
    i have a requirement like this,
    there are two select statements like below
    select * from IFLO appending corresponding fields of table it_itab_33kv
    where begru eq '006F' and fltyp eq '6'.
    select * from IFLO appending corresponding fields of table it_itab_33kv
    where begru eq '004F' and fltyp eq '4'.
    i wanted to do some thing like this in my ALV report
    serno      cost center     cost center name    no:of 33kv substations       no:of 11kv feeders
    1              0402120401       xxxxx                         2                                          1
    2              0402120301       xxxxx                         1                                          3
    3              0402120201       xxxxx                         3                                          2
    cost center wise i need to aggregate this,
    how do i write my logic in internal table....
    suggest me some ways....
    thankq

    Hi,
    in the final alv grid u want to display  first u sort the cost center and if you want to add the 33 kv and 11 kv feeder.use the code
    data: l_grid type ref to cl_salv_table,
           lr_functions type ref to cl_salv_functions_list.
    CONSTANTS: gc_true  TYPE sap_bool VALUE 'X'.
    sortlt_final ascending costcenter.
    loop at lt_final into wa_final.
    collect wa_final into lt_final.
    endloop.
    CALL METHOD cl_salv_table=>factory
       IMPORTING
         r_salv_table = l_grid
       CHANGING
         t_table      = lt_final.
    lr_functions = l_grid->get_functions( ).
    lr_functions->set_all( gc_true ).
    l_grid->display( ).
    hope it helps...do reward so

  • Problem with Emailing the Internal table data as an excel attachment

    Hi Friends,
    I am facing problem with Emailing an internal table data as an excel file. I am using standard function module "SO_NEW_DOCUMENT_ATT_SEND_API1" which is using SOLI structure can have record with 255 character length. But my Internal table having each record means after concatenating all the fields it is going to be morethan 450 characters. so i t is not displaying all the data in excel file.
    Can somebody help me if there is any other function module or any other way that i need to follow.
    thanks for help
    venkat.

    You must use the the :
    CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as a field seperator and
    CL_ABAP_CHAR_UTILITIES=>CR_LF as a record seperator.
    Check this example:
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Regards,
    Naimesh Patel

  • With in the internal table can I READ the same internal table for a record?

    With in the internal table can I READ the same internal table?
    For Suppose
    LOOP AT itab.
    can I do as below
    READ TABLE itab with key bukrs = itab-bukrs
                       belnr = itab-belnr.
    *and I have to compare
    IF itab-shkzg = itab-shkzg_ia.
    ENDIF.
    ENDLOOP.

    Hi,
    Yes..But use work area to differentiate..
    EX.
    DATA: WA LIKE ITAB.
    DATA: WA_READ LIKE ITAB.
    LOOP AT itab <b>INTO WA</b>.
    can I do as below
    READ TABLE itab <b>INTO WA_READ</b>
               with key bukrs = itab-bukrs
    belnr = itab-belnr.
    *and I have to compare
    IF <b>WA</b>-shkzg = <b>WA_READ</b>-shkzg_ia.
    ENDIF.
    ENDLOOP.
    Please reward for helpful answers.
    Thanks,
    Naren

  • Selecting records from DB table with out using internal tables

    hi,
    i need to retrieve values from a database table based on few fields and date as well. however, i need to check whether the date is less or equal to the current date and along with that i should get the appropriate record. how can i do that with out using internal table.
    field1-----date---
    11111----
    20070219
    11111--20070214 <---
    11111----
    20070205
    in the above scenario i should get the second record
    Regards,
    Kranthi.

    Try:
    REPORT ztest MESSAGE-ID 00.
    TABLES bkpf.
    SELECT * FROM bkpf
      UP TO 1 ROWS
      WHERE budat <= sy-datum
      ORDER BY budat DESCENDING.
    ENDSELECT.
    Rob

  • The best way to get help with logic

    I was posting in a thread on support for logic which appears to have been deleted. anyway, what I was going to say I think is useful info for people, so I'm going to post it anyway. to the mods - it doesn't contain any speculation about policies or anything like that. just an explanation of my views on the best way to deal with issues people have with logic, which I think is a valuable contribution to this forum.
    I think there's a need for perspective. when you buy an apple product you get 90 days of free phone support to get everything working nice and neat. you can call them whenever, and you could actually keep them on the phone all day if you wanted, making them explain to you how to copy a file, install microsoft office, or any number of little questions no matter how simple - what is that red button thingy in my window for?.. on top of that, you've got a 14 day dead on arrival period (or 10 days I can't remember) in which if your machine has any kind of hardware fault whatsoever it's exchanged for a totally new one, no questions asked. a lot of people complain that applecare is overpriced.. and if you think of it just as an extended warranty, then it is a little pricey. but if you are someone that could use a lot of phone support, then it's actually potentially a total bargain. the fact that 2 or more years after you bought a computer, you could still be calling them every single day, asking for any kind of advice on how to use anything on the machine, is quite something. many people on this forum have had problems when they made the mistake of upgrading to 10.4.9 without first creating a system clone or checking first with their 3rd party plug in vendors to make sure it was ok. so, with apple care, you could call them and keep a technician on the phone _all day_ talking you through step-by-step how to back up all of your user data, how to go through and preserve your preferences and any other specific settings you might not want to lose, and then how to rollback to an earlier OS version.. they'll hold your hand through the whole thing if you need them to.
    as for applecare support for pro apps like logic, I'd be the first person to agree that it's not great for anyone except beginners and first time users. if you look at what it takes to get even the highest level of logic certification, it's all pretty basic stuff. and logic doesn't exist in a vacuum, there is an entire universe of 3rd party software and hardware, as well as studio culture and advanced user techniques that are going to be totally invisible to some poor phone support guy at apple that did a logic 101. but it's not hard to see that apple are trying to promote a different kind of support culture, it's up to you to decide whether you want to buy into it or not.
    the idea is that they are able to provide basic setup support for new users, including troubleshooting. because it's a simpler level of support, at least they can do this well. so there's no reason why any new user with say a new imac and logic can't get up and running with the 90 days of phone support they get for free.
    but the thing is, for extremely high end pro users it's a different matter altogether. pro use of logic within the context of say, a studio or a film composition scenario is a very different world. it's almost a nonsense to imagine that apple could even hire people capable of giving useful support for this end of the spectrum, over the phone. there are so many variables, and so many things that require a very experienced studio person or in-work composer to even begin to understand the setup, let alone troubleshoot it. and it's a constantly evolving world, you actually have to be working in it and aware of developments on 3rd party fronts as well as changes in hardware.. not to mention even changes in the culture of studio production and the changed expectations that come from that. there's no way some poor little guy sitting at a help desk at apple can even hope to be privy to that kind of knowledge. it's already good enough that they don't outsource their support staff to india, let alone go out to studios and hire the very people with the skills that should be staying in the studio! not answering phones for apple.
    so, given this reality.. companies have two choices. they can either offer an email based support ticket system, which others do. but in my opinion.. this can just be frustrating and only a half-solution. sure you 'feel' like you are getting a response from the people that make the software and therefore must know it.. but it's not really the case due to what I said above. DAWs don't exist in a vacuum, and so much of what you need to understand to help people requires an intimate knowledge of the music industry in which they are working. you still won't get that from steinberg, even if they sort of answer your emails. the other problem is that this kind of system can mean sporadic answers, a lot of tail-chasing, and quite often you won't get an answer that helps you in the end anyway.
    the other model is to foster a strong user support culture. some people react in the wrong way to this idea.. they just think it's a big brush off from the manufacturer, saying we don't care, go sort it out yourselves.. but this isn't true. apple has a classification for pro resellers called 'apple solutions expert - audio'. what this means is that these dealers are recognised as audio specialists and they can receive extra support and training from apple for this. but more importantly than this.. most of them are music stores, or pro gear dealerships that are also mac and logic dealers. they already employ people that have worked or do work in the music industry, and are constantly on top of all of this stuff. apple encourages these dealers to run workshops, and to provide expert sales advice in the very niche area that logic is in, which they can do far better than some generic apple store ever could. but most importantly, they are encouraged to offer their own expert after-sales support and whatever other value-adding expertise they can, to get sales. because margins in computer gear are so tight nowadays, discounting is not really a viable option for these dealers to guarantee getting musicians to buy computers and logic setups from them. the only companies that can entice people with a lower price a big online wholesalers or big chain stores. so the best idea for these niche expert stores to get sales is to offer you their own experts to help with configuration, ongoing support and to generally make it a better idea that you bought your system from them rather than from some anonymous online store. I can see the wisdom of this.. it puts the support back out there on the ground where it's needed, and also where it can work best. apple could never hope to offer the same level of expertise in helping a film composer work through some issues with a specific interface or some highly specific issue they have with getting a task done. no big software manufacturer could do this anywhere near as well as people out there that have worked in studios or currently do work in studios. so in my opinion it's a far better model to foster this kind of support culture, along with training courses, books and training video support. also user forums like this one are possibly one of the most valuable ports of call anyone could ask for. apple couldn't replicate this with their own staff, even if they tried. and even if they made a system where some of the people close to logic development were able to answer emails, it would still be nowhere near as useful, as rapid or as capable of being up to speed with logic use out in the real world with 3rd pary gear, as any of these other methods are.
    the only thing I think they could do better would be to publish a list of known bugs which are officially recognised. this would help everyone and put an end to a lot of wasted time and speculation on if something is a bug totally to do with logic, or if it's a specific issue raised by a particular configuration.
    but really, in my view, a 3rd party support and training culture through a combination of specialist dealers, consultants that literally run a business setting up computers for pro-users and helping them keep it all working, online user-to-user forums and published materials really are the way forward.

    In all honesty this is currently the 3rd "logicboard" (motherboard)
    in my powerbook due to a design flaw regarding the 2nd memory slot....
    Yep. Mine failed five weeks after I bought it. However, I bought it for work and couldn't afford being without it for four weeks while they fixed it, so I had to live with it. My serial number did not entitle me to a replacement either, post Applecare.
    My firewire ports have burnt out from a third-party defective device (no hot-plugging involved)
    My screen is blotchy (my PW serial number did not entitle me to a replacement).
    My battery serial number did not entitle me to a replacement, and is not that good these days.
    My guaranteed Powerbook-compatible RAM is actually not, causing RAM related problems, most notably these days meaning that as soon as I switch to battery power, the laptop crashes, so I can only use mains power. The company I bought it from stopped taking my calls and wouldn't replace it after they replaced it once, so I'm stuck with it. And of course, only one ram slot is working, so I can't even use my original stick in the first slot, which would shift the dodgy stuff away from the lower system area.
    My power supply failed at the weak spot and caught fire. I managed to break apart the power supply and recable it so I didn't have to buy a new power supply, although the connection at the laptop end is loose (all the more fun that as soon as power is lost, the laptop crashes - see above). The power supply is held together with gaffa tape. Silver gaffer tape though, so it's still kind of 'Appley"...
    My internal hard drive is dying - four or five times now it clicks and won't power up, causing the laptop to die.
    One foot has fallen off (but glued back on).
    The lid is warped.
    The hinge is loosish.
    The S-Video adaptor cable is intermittent.
    But aside from all that, I have looked after it well, and I love it to death. Just as well, because it doesn't look like it will be that long...
    But it still "just works". Apart from the battery power obviously. And the ram slot. And the ram. And the screen. And the hard drive. And the firewire ports. And the feet.
    But everything apart from the main board, the screen, the case, the hard drive and the power supply works fine. So thats... er..
    Hmm.

  • Problem with downloading the internal table onto the presentation server.

    Hey folks,
    I have a problem where in i am downloading one year of sales done by the company. I wrote a program to download the file onto the presentation server . The error occurs in the FM GUI_DOWNLOAD where if the file exceeds 105843504 bytes its giving me a dump saying that
    When the program was running , it was established that more memory was needed than the operating system is able to safely to provide.
    The current program has to be terminted because of the program already requested 105843504 bytes from the operating system with malloc when the operating system reported after further memory request that there was no more memory space available.
    Could somebody provide an alternative soltuion for this.
    Its really urgent as i can download the file with 70,000,000 bytes
    Regards
    Rock

    Hi Rock,
    Please download the files on to Application Server, else as suggested by Ashish download into 2 or 3 files and merge them manually.
    Declare same internal tables may be 5 times.
    When you fill the internal table check for a counter and when you hit a certain number stop appending to it and start appending to the next.
    After you are done so download all the internal tables.
    I guess this would be a good way. I am not sure if there are any ther alternative good methods.
    Hope this helps.
    Shreekant

  • Logic in internal table -- Urgent

    Hi All,
    I have an internal table idoc_data of structure
          DOCNUM  SEGNUM  SEGNAM       
          3164     00001  E1STZUM -
    1st idoc
          3164     00002  E1MASTM
          3164     00003  E1MARAM
          3164     00004  E1MAKTM
          3164     00005  E1STPOM -
    end of 1st idoc
          3164     00006  E1STZUM  -
    2nd idoc
          3164     00007  E1MASTM
          3164     00008  E1MARAM
          3164     00009  E1STPOM -
    end of 2nd idoc
          3164     00010  E1STZUM  -
    3rd idoc
          3164     00011  E1MASTM
          3164     00012  E1MARAM
          3164     00013  E1STPOM  -
    end of 3rd idoc
          and so on .........
    "Pls note that the idocs are collected into a single idoc having same DOCNUM 3164".
    I have to write a logic like this.
    Loop at idoc_data.
    Move the first idoc record starting from E1STZUM -
    1st idoc till E1STPOM----end of 1st idoc into a temporary internal table and call master_idoc_distribute to send an idoc out.
    Move the second idoc record starting from E1STZUM  -
    2nd idoc till E1STPOM -
    end of 2nd idoc into the temporary internal table and call master_idoc_distribute to send an idoc out.
    Move the third idoc like the same and so on........for the whole idocs. 
    There could be even more than 5000 idocs in the same structure having same idoc number.
    Any help in writing the logic is really appreciated. Pls send me the whole code itself. It is an urgent reqmt. So pls do the needful.....
    Thanks
    Ricky

    Will explain one more time.
    Internal table structure
    DOCNUM SEGNUM SEGNAM
    3164 00001 E1STZUM -
    1st idoc
    3164 00002 E1MASTM
    3164 00003 E1MARAM
    3164 00004 E1MAKTM
    3164 00005 E1STPOM
    3164 00006 Z1MARZ -
    end of 1st idoc (this could be more than one )
    3164 00007 E1STZUM -
    2nd idoc
    3164 00008 E1MASTM
    3164 00009 E1MARAM
    3164 00010 E1STPOM
    3164 00011 Z1MARZ -
    end of 2nd idoc (this could be more than one)
    3164 00010 E1STZUM -
    start of 3rd idoc
    3164 00011 E1MASTM
    3164 00012 E1MARAM
    3164 00013 E1STPOM
    3164 00014 Z1MARZ     -
    end of 3rd idoc (this could be more than one)
    and so on.........
    "Pls note that the idocs are collected into a single idoc having same DOCNUM 3164".
    I have to write a logic like this.
    Loop at idoc_data.
    Move the first idoc record starting from E1STZUM -
    1st idoc till Z1MARZ----end of 1st idoc into a temporary internal table and call '' FM master_idoc_distribute'' to send an idoc out.
    Move the second idoc record starting from E1STZUM -
    2nd idoc till Z1MARZ -
    end of 2nd idoc into the temporary internal table and call FM "master_idoc_distribute" to send an idoc out.
    Move the third idoc like the same and so on........for the whole idocs.
    There could be even more than 5000 idocs in the same structure having same idoc number.
    Any help in writing the logic is really appreciated. Pls send me the whole code itself. It is an urgent reqmt. So pls do the needful.....
    Thanks

  • Need logic in Internal table processing

    Hi all,
    I have requirement like this.
    i cretaed  three internal tables
    1) first Internal table can store total uploaded data from flat file..means line by line( Here each line is one record)
    2) Second internal can store all fields which are fetched based on table which is given on selction screen.
    3)now i cretaed one internal table with one variable
    4) i used spilt statement on first internal table ( which store all flat file recrds) into third internal table.
    so , my third internal table has first records values of first internal table in one column.
    Now my probelm...i need to populate bapi structre tables with values of third internal table based on field names of second internal table. i am not able to do logic.
    Is there any pointers to know soultion
    Note:we know which fields values from flat values  needs to populate Bapi structure table..
    Thanks in advance,
    regards,
    JBR

    check this program may be u will get the logic
    *& Report  ZBAPI_MATERIAL_SAVEDATA
    *& PURPOSE : THIS REPORT USES BAPI MATERIAL SAVE DATA TO UPDATE AND CREATE
    *&           THE MATERIAL
    REPORT  ZBAPI_MATERIAL_SAVEDATA NO STANDARD PAGE HEADING MESSAGE-ID (ZHNC).
    TYPES:BEGIN OF TY_MAT,
           MATERIAL(4),
           IND_SECTOR(1),
           MATL_TYPE(4),
           MATL_GROUP(9),
           BASE_UOM(3),
           BASE_UOM_ISO(3),
           PLANT(4),
           DEL_FLAG(1),
           PUR_GROUP(3),
           BASE_QTY(13),
           STGE_LOC(4),
           MRP_IND(1),
           SALES_ORG(4),
           DISTR_CHAN(2),
           DEL_FLAG1(1),
           MIN_ORDER(13),
           LANGU(2),
          MATL_DESC(40),
       END OF TY_MAT.
    DATA: IT_DATA TYPE TABLE OF TY_MAT,
          WA_DATA LIKE LINE  OF IT_DATA.
    *decalraing flag
    data: v_flag value ''.
    *DECLARING WORK AREAs  TO BE PASSED TO THE FUNCTION MODULE.
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,
          BAPI_CLIENTDATA LIKE BAPI_MARA,
          BAPI_CLIENTDATAX LIKE BAPI_MARAX,
          BAPI_PLANTDATA LIKE BAPI_MARC,
          BAPI_PLANTDATAX LIKE  BAPI_MARCX,
          BAPI_STORAGELOCATIONDATA LIKE BAPI_MARD,
          BAPI_STORAGELOCATIONDATAX LIKE BAPI_MARDX,
          BAPI_SALESDATA LIKE BAPI_MVKE,
          BAPI_SALESDATAX LIKE BAPI_MVKEX,
          BAPI_MAKT LIKE BAPI_MAKT,
          BAPI_RETURN LIKE BAPIRET2.
    *INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION
    DATA: BEGIN OF IT_MAKT OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA END OF IT_MAKT.
    DATA:BEGIN OF IT_RET OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA END OF IT_RET.
    *INTERNAL TABLE TO HOLD HEADER DATA
    DATA: IT_EXCEL TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *SELECTION-SCREEN ELEMENTS
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER: FNAME TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT 'C:\Documents and Settings\Administrator\Desktop\MATMAS.XLS' .
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
                P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
                P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
                P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK B1.
    *DECLARATION OF EXCELAL TABLE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    PERFORM F_GET_FILE USING FNAME.
    START-OF-SELECTION.
    PERFORM F_XLS_ITAB USING FNAME
                       CHANGING IT_EXCEL.
    PERFORM F_MOVE_DATA.
    perform F_GET_DATA.
    *&      Form  F_GET_FILE
          text
         -->P_FNAME  text
         <--P_SY_SUBRC  text
    FORM F_GET_FILE  USING    P_FNAME LIKE FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
      STATIC              = ' '
      MASK                = ' '
      CHANGING
        FILE_NAME           = P_FNAME
    EXCEPTIONS
      MASK_TOO_LONG       = 1
      OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZHNC).
    ENDIF.
    ENDFORM.                    " F_GET_FILE
    *&      Form  F_XLS_ITAB
          text
         -->P_FNAME  text
         <--P_IT_EXCEL  text
    FORM F_XLS_ITAB  USING    P_FNAME
                     CHANGING P_IT_EXCEL.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = FNAME
        I_BEGIN_COL                   = P_BEGCOL
        I_BEGIN_ROW                   = P_BEGROW
        I_END_COL                     = P_ENDCOL
        I_END_ROW                     = P_ENDROW
      TABLES
        INTERN                        = IT_EXCEL
    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.
    ENDFORM.                    " F_XLS_ITAB
    *&      Form  F_MOVE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_MOVE_DATA .
    DATA : LV_INDEX TYPE I.
    FIELD-SYMBOLS <FS>.
    *--- Sorting the internal table
    SORT IT_EXCEL BY ROW COL.
    CLEAR IT_EXCEL.
    LOOP AT IT_EXCEL.
    MOVE IT_EXCEL-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
    ASSIGN COMPONENT LV_INDEX OF STRUCTURE WA_DATA TO <FS>.
    *--- Asigning the field value to a field symbol
    MOVE IT_EXCEL-VALUE TO <FS>.
    AT END OF ROW.
    APPEND WA_DATA TO IT_DATA.
    CLEAR WA_DATA.
    ENDAT.
    ENDLOOP.
    ENDFORM.                    " F_MOVE_DATA
    *&      Form  F_GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DATA .
    LOOP AT IT_DATA INTO WA_DATA.
    MOVE-CORRESPONDING WA_DATA  TO  BAPI_HEAD.
    BAPI_HEAD-BASIC_VIEW ='X'.
    BAPI_HEAD-SALES_VIEW ='X'.
    BAPI_HEAD-PURCHASE_VIEW ='X'.
    BAPI_HEAD-STORAGE_VIEW ='X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_CLIENTDATA.
    BAPI_CLIENTDATAX-MATL_GROUP = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM_ISO = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_PLANTDATA.
    BAPI_PLANTDATAX-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_PLANTDATAX-DEL_FLAG = 'X'.
    BAPI_PLANTDATAX-PUR_GROUP = 'X'.
    BAPI_PLANTDATAX-BASE_QTY = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_STORAGELOCATIONDATA.
    BAPI_STORAGELOCATIONDATA-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-PLANT = BAPI_STORAGELOCATIONDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-STGE_LOC = BAPI_STORAGELOCATIONDATA-STGE_LOC.
    BAPI_STORAGELOCATIONDATAX-MRP_IND = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_SALESDATA.
    BAPI_SALESDATAX-SALES_ORG = BAPI_SALESDATA-SALES_ORG.
    BAPI_SALESDATAX-DISTR_CHAN = BAPI_SALESDATA-DISTR_CHAN.
    BAPI_SALESDATAX-DEL_FLAG = BAPI_SALESDATA-DEL_FLAG.
    BAPI_SALESDATAX-MIN_ORDER = 'X'.
    REFRESH IT_MAKT.
    IT_MAKT-LANGU = WA_DATA-LANGU.
    IT_MAKT-MATL_DESC = WA_DATA-MATL_DESC.
    APPEND IT_MAKT.
    CLEAR IT_RET.
    REFRESH IT_RET.
    PERFORM F_CALL_BAPI.
    READ TABLE IT_RET WITH KEY TYPE = 'S'.
    IF SY-SUBRC EQ 0.
    PERFORM F_BAPI_COMMIT.
    WRITE:/ 'MATERIAL CREATED OR UPDATED SUCESSFULLY WITH MATERIAL NO',WA_DATA-MATERIAL.
    ELSE.
    MESSAGE E000(ZHNC) WITH 'ERROR IN CREATING THE MATERIAL'.
    *WRITE: / 'ERROR IN CREATIN MATERIAL',IT_RET-MESSAGE.
    *PERFORM F_DOWNLOAD.
    ENDIF.
    *ENDIF.
    ENDLOOP.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_CALL_BAPI
          text
    -->  p1        text
    <--  p2        text
    FORM F_CALL_BAPI .
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        HEADDATA                   = BAPI_HEAD
       CLIENTDATA                 =  BAPI_CLIENTDATA
       CLIENTDATAX                =  BAPI_CLIENTDATAX
       PLANTDATA                  =  BAPI_PLANTDATA
       PLANTDATAX                 =  BAPI_PLANTDATAX
       STORAGELOCATIONDATA        =  BAPI_STORAGELOCATIONDATA
       STORAGELOCATIONDATAX       =  BAPI_STORAGELOCATIONDATAX
       SALESDATA                  =  BAPI_SALESDATA
       SALESDATAX                 =  BAPI_SALESDATAX
    IMPORTING
       RETURN                     =  IT_RET
    TABLES
       MATERIALDESCRIPTION        = IT_MAKT
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
      RETURNMESSAGES             =
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    APPEND IT_RET.
    ENDFORM.                    " F_CALL_BAPI
    *&      Form  F_BAPI_COMMIT
          text
    -->  p1        text
    <--  p2        text
    FORM F_BAPI_COMMIT .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT         =
    IMPORTING
      RETURN        =
    ENDFORM.                    " F_BAPI_COMMIT

  • How to generate a text file with values from internal table

    hi,
    can anybody help me out to get the values from different internal table written into a text file.
    regs,
    raja

    used gui_download,ws_download,cl_gui_file_save.
    data: ld_filename type string ;
    ld_filename = 'c:\demo.txt'.
    DATA: begin of it_datatab occurs 0,
    row(500) type c,
    end of it_datatab.
    HII
    call function 'GUI_DOWNLOAD'
    exporting
    filename = ld_filename
    filetype = 'ASC'
    tables
    data_tab = it_datatab[]
    exceptions
    file_open_error = 1
    file_write_error = 2
    others = 3.
    gui_download

  • Noob needs help with Logic and Motu live setup.

    Hello everyone,
    I'm a noob / semi noob who could use some help with a live setup using 2 MOTU 896HD's and Logic on a Mac.
    Here's the scenario:
    I teach an outdoor marching percussion section (a drumline and a front ensemble of marimbas and vibes). We have an amazing setup of live sound to amplify and enhance the mallet percussion. There is a yamaha PA system with 2 subs and 2 mains which are routed through a rack unit that processes the overall PA balance. I'm pretty sure that the unit is supposed to avoid feedback and do an overall cross-over EQ of the sound. Other then that unit, we have 2 motu896hd units which are routed via fire-wire. I also have a coax cable routing the output of the secondary box to the input of the primary box (digital i/o which converts to ADAT in (i think?)..?
    Here's the confusion:
    There are more then 8 inputs being used from the ensemble itself, so I need the 16 available inputs to be available in Logic. I was lead to believe that the 2nd motu unit would have to be sent digitally to the 1st motu unit via coax digital i/o. Once in Logic, however, I cannot find the signal or any input at all past the 8th input (of the 1st unit).
    Here's the goal:
    All of my performers and inputs routed via firewire into a Mac Mini running OSX and Logic pro.
    I want to be able to use MainStage and run different patches of effects / virt. instruments for a midi controller keyboard / etc.
    I want to be able to EQ and balance the ensemble via Logic.
    Here's another question:
    How much latency will I be dealing with? Would a mac mini with 4gb of ram be able to handle this load? With percussion, I obviously want the sound as latency free as possible. I also, however, want the flexibility of sound enhancement / modification that comes with Logic and the motu896hd units.
    Any help would be REALLY appreciated. I need the routing assistance along with some direction as to whether or not this will work for this type of application. I'm pretty certain it does, as I have spoken with some other teachers in similar venues and they have been doing similar things using mac mini's / logic / mainstage / etc.
    Thanks in advance,
    Chris

    You'll definitely want to read the manual to make sure the 896HDs are connected together properly. ADAT is a little tricky, it's not just a matter of cabling them together. Go to motunation.com if you need more guidance on connecting multiple devices. Beyond that initial hookup, here are a couple of quick suggestions:
    1. Open CueMix and see if both devices are reported there. If not, your connections aren't correct. Be sure to select 44.1kHz as your sample rate, otherwise you are reducing the number of additional channels. For instance at 88.2kHz you would get half the additional channels via ADAT.
    2. You may need to create an aggregate device for the MacBook to recognize more than the first 896HD. Lots of help on this forum for how to do that. Again, first make sure you have the 896HDs connected together properly.
    3. As for latency with Mainstage on the Mini, no way to know until you try it. Generally MOTU is fantastic for low latency work but Mainstage is a question mark for a lot of users right now. If the Mini can't cut the mustard, you have a great excuse to upgrade to a MacBook Pro.

  • Help with logical model

    Hi, I am new to this software and need some help with a simple logical model.
    Here is the task:
    I need to create a model for a parking garage.
    Each level can have any number of lots.
    There are different types of lots (handicapped, women, regular, ...) with different Prices and Sizes.
    It is important for the users and the system to know whether a lot is free or occupied.
    It is crucial to assign numbers to the lots, so users can find it again.
    And this is my model:
    Level 1:n Lot n:1 Type
    (#Level) (#Number,*Availability) (#Type,*Price,*Size)
    Question:
    Is it correct or would you change something? I am not quite sure whether to make availability and level an entity or an attribute of Lot.
    Which data types do I need to assign each attribute? What is the difference between logical and domain?
    Thanks in advance
    Edited by: user13256814 on Jun 2, 2010 3:51 AM

    Hi Bhaskaran,
      u can see the logs correspoding to your application in the server location..
    \usr\sap\<sid>\<instance_number>\j2ee\cluster\server0\
    i think ur application folder will be there inside this or within one subdirectory here.
    http://help.sap.com/saphelp_nw04s/helpdata/en/fe/4f5542253fb330e10000000a155106/content.htm
    U can check the service entries in services file which is located in
    <Drive Name>:\WINDOWS\system32\drivers\etc...
    but normally in JCO Connection test , if it is not showing errors(especially MetaData) , then it means this entry is there in the services file.
                                   Regards
                                     Kishor Gopinathan

  • Need a logic for Internal table processing

    Hi,
    I have a requirement...an internal table contains three fields material no, bin no, and Quantity
    Mat. No    |         Bin No        |              Quantity
    a              |              x1         |                   10
    a              |              x1         |                   10
    a              |              x2         |                   20
    b              |              x3         |                   10 
    c              |              x3         |                   20
    c              |              x4         |                   30
    c              |              x4         |                   40
    In this I need to append the records to new internal table say itab1 where multiple entries exist for some material no like mat no 'a' and 'c'  and
    if the material no. exist only once in the table, it has to be moved to another new internal table say itab2.
    Pls suggest some logic that does not have performance issues.
    Thanks in advance
    Saravana

    Hi there,
    a solution in brief...
    data: wa_itab1_a like itab1,
             wa_itab2_b like itab1,
             lv_tabix       type sytabix.
    sort itab1 by matnr.
    loop at itab1.
      wa_itab1_a = itab1.
      at new matnr.
        lv_tabix = sy-tabix + 1.
        clear wa_itab2_b.
        READ TABLE itab1 into wa_itab2_b
                            INDEX lv_tabix.
        if wa_itab2_b-matnr ne wa_itab1_a-matnr.
          append wa_itab1_a to itab2.
          delete itab1 where matnr = wa_itab1_a-matnr.
        endif.
      endat.
    endloop.
    Regards
    George Zervas
    Edited by: gzervas on Oct 20, 2010 12:08 PM

  • Logic for internal table

    Hi,
    I have an internal table with the following structure.
    PO Number     PO Line Number     Quantity     ETA
    PO_1     001     10     10 Aug 2009
    PO_1     002     12     11 Aug 2009
    PO_2     001     5     10 Aug 2009
    PO_1     001     13     10 Aug 2009
    PO_1     001     7     11 Aug 2009
    Now I want to sum up quantity based on ETA dates so that the structure will look like as below:
    PO Number     PO Line Number     Quantity     ETA
    PO_1     001     23     10 Aug 2009
    PO_1     001     7     11 Aug 2009
    PO_1     002     12     11 Aug 2009
    PO_2     001     5     10 Aug 2009
    Collect statement will not work as the checking is on date but not  on po no and line item.
    Regards,
    Abhi...

    Use SUM statement for adding the quantity fields.
    Sample code :
    LOOP AT T INTO WA_T.
    WA_N = WA_T
        SUM.
    WA_N-QUANTITY = WA_T-QUANTITY.
    APPEND WA_N TO ITAB_N.
    ENDLOOP.

  • Help with Logic Pro 8 Outputs

    Hi
    Struggling with something that i imagine is very simple but just cant work it out! Please help me.
    I will be using Logic 8 within a live environment and need to basically get various audio tracks 'out' of logic via my interface into a mixing desk.  I have 8 sub outs on my interface which is fine for me. (prob lots of people do this also with a mixing desk in the studio environment for intergration with the desk and outboard gear so i 100% sure it can be done!)
    Prob 1 is that the track sub outs in logic come in stereo pairs. If i want bass to go to output 1 , and kick for eg to go to output 2, how can i do this???? Is there a way to change the track outputs to mono?
    Prob 2 is that if i change the outputs in one session, for example click to output 3 - 4, vocals for example to output 5 and 6, then save the session, close and reopen, they have all reverted to output 1 and 2. In a live situation it is annoying to have to change these before each song starts!
    I play in a electro band that incorperates live drums, analog synths, logic audio (backing tracks kinda thing) aswell as live instruments, and finding logic pretty challenging to use for this!! We are flat broke and cant afford new stuff so have been living with it but we are now starting to need more outputs (for the benefits of live mixing , ie not giving the engineer a stereo out) . Surely the mixer in logic is capable of these totally bog standard audio routing options?!?!?
    Thanks alot for any help
    David

    jayme Lewis wrote:
    So here's the problem. I went on a shopping spree recently and purchased an 8-core Nehalem 8-core Mac with 14 GB RAM, Apogee's Symphony system (With Rosetta 800 and AD-16X), and I use this gear with Logic Pro 8.
    I still get system overload messages. Sometimes with only 1 virtual instrument and 8 audio tracks!
    What gives? I'm running the fastest machine on the fastest system with the fastest/cleanest hardware.
    I'm running Logic Pro on all of its highest settings (like it should).
    ?It's highest settings?
    Do you mean the sample buffer is at 32 or 1024.
    Even though you have Apple's flagship system it's still possible for Logic to bring it to it's knees. High sample rates plus a couple of space designer reverbs can send a single core into an overload condition.
    Try these settings under Preferences/Audio.
    I/O Buffer Size - 256
    Process buffer - medium
    Do NOT have the I/O Safety Buffer selected.
    More info.
    What sample rate and bit depth are you recording at? ie: 48kHz, 24-bit?
    When you open Logic's CPU meters are you seeing a single core spiking?
    What effects are being used on the audio and single VI track?
    pancenter-

Maybe you are looking for

  • IOMMU explanation of kernel parameters

    Hello! I've set up an HTPC with an AMD A4-5300 CPU, A75 (Hudson-D3) chipset and a PCIe sound card (Asus Xonar DX). Whenever I tried to get a sound out of it (e.g. aplay blubb.wav) I only got dozens of these messages in the kernel log: [ 46.215678] AM

  • Need help with my applet. I am new to applets...Please help..please...

    Here is one method from the class: public void update(Graphics g) {                Dimension d = size();                int w = sky.getWidth(this);           int h = sky.getHeight(this);                // If we've loaded the moving image, draw it.   

  • Print report through application server

    we are running our application through 9ias .we are unable to print the report through printer attached to machine other then machine having application server installed on it .

  • Arret automatique du programme

    Bonjour, cela fait un moment que je bloque sur une partie de mon programme. J'envoie trois signaux pour une commande de moteur. Je voudrais que le signal "ENABLE" qui arrete ma carte arrete aussi le programme Labview. Je bloque sur cette étape. Voici

  • Capture in GB's

    I'm unsure how to use alot of features on this cam but I tried the capture part of the cam and recorded 4mins of something and when I checked the size of the file when done the file size was huge! over 2GB's thats the size of a full movie! how do I c