Logic needed on general abap

Hi Experts
I am having a list of TAXCODES like.
"CA" "CC" "CD" "DA" "DE" "WS"
Now in purchase orders if  i am having different line items having the above TAX CODES.
i need to pass a variable &XXX& which is having text to sap script form.
And if the Purchase order having line items which is having one of the taxcode above for one line item and the other line item having diifferent  taxcode like V0 etc { for these case i dont need to send text data }
and if the PO  having one tax code for all line items.{ i need to send the data }
how to achive this
i am trying in this way
    SELECT ebeln
           ebelp
           mwskz          "Tax code
      FROM ekpo
      INTO TABLE lt_ekpo
      WHERE ebeln = v_ebeln
     AND   mwskz in r_mwskz
      AND loekz = ''.
    DESCRIBE TABLE lt_ekpo LINES lv_count.
    lt_ekpo1[] = lt_ekpo[].
    SORT lt_ekpo1 BY ebelp DESCENDING.
    READ TABLE lt_ekpo1 INTO wa_ekpo INDEX 1.
    v_ebelp1 = wa_ekpo-ebelp.
    CLEAR wa_ekpo.
LOOP AT lt_ekpo INTO wa_ekpo.
      IF sy-tabix = 1.
        lv_taxcode = wa_ekpo-mwskz.
     ELSE.
        IF lv_taxcode NE wa_ekpo-mwskz.
          lv_diff_tax = 'X'.
       if  lv_taxcode EQ 'CA' or lv_taxcode EQ 'CC' or lv_taxcode EQ 'CD' OR lv_taxcode EQ 'DA' OR lv_taxcode EQ 'DE' or  lv_taxcode EQ 'WS'.
         ELSE.
       ENDIF.
      ENDIF.
please provide the logic for the above case.
Edited by: suribabu124 on Apr 26, 2010 4:13 PM

hi
this can be done using rages
Regards
Suresh

Similar Messages

  • LOGICAL DATABASE IN HR ABAP PRPGRAMMING

    Hi Friends,
    what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
    AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
    regards,
    vijay.

    hi
    HR Logical Databases
    In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
    PNP (PNPCE)
    PAP
    PCH
    By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
    Logical Database PCH
    This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
    Logical Database PNP (or PNPCE)
    Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
    Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
    Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
    Reporting on working time and planned compensation for a position that an employee occupies
    Reporting on the validity and proficiency of a qualification that an employee fulfils
    From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
    The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
    You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
    Logical Database PAP
    Logical database PAP enables you to access data from Recruitment.
    regards
    navjot
    reward if helpfull

  • How to Call general ABAP Report in WDA?

    Hi All,
    Is it possible to run our general ABAP report in our WDA.
    If yes how can i move....
    Thanks & regards,
    Ravi

    David Pietroniro wrote:
    > Hello,
    >
    > You can call your report using the SUBMIT command to call it like a job. Follow an example on how to do this (from ABAP Help).
    > But this is only usefull if this report only process data and don't show data on screen, because this data can´t be showed in the web dynpro via write commands like described in the threads before.
    >
    > Regards.
    Actually with a few changes you are close to a solution here.  There is way to get the output of the report and convert it to HTML.  You will need to have a little wrapper application around your report. You will have to run this wrapper as a background job or via RFC (pointing to destination NONE). Here is a sample:
    * SELECTION SCREEN LAYOUT                                              *
    selection-screen begin of block two with frame title text-002.
    parameter: prog like sy-repid.
    parameter: vari1 like raldb-variant.
    selection-screen end of block two.
    .....Other Processing....
    submit (prog) and return
               exporting list to memory
               using selection-set vari1.
      call function 'LIST_FROM_MEMORY'
           tables
                listobject = itab
           exceptions
                not_found  = 1.
      if sy-subrc ne 0.
        leave program.
      endif.
      call function 'WWW_HTML_FROM_LISTOBJECT'
       exporting
    *    REPORT_NAME         =
         template_name       = 'WEBREPORTING_REPORT'
        tables
          html                = html_tab
          listobject          = itab.
    Once the data is converted into HTML it is more usable from WD.  You can't really display it directly within WD, but you could push it out as a file attachment from WD using cl_wd_runtime_services=>attach_file_to_response.
    This is a lot of work and I still think it might be easier to fire a linkToURL or Exit Plug and navigate to the ITS/WebGUI.

  • XI or General ABAP certification?

    Hi friends.
    greetings for the day.
    this is Prashant.I have around 3 years of wrking exp in General ABAP....for certification Siemen's HR people suggested me to go for XI(exchange Infrastructure) certifaication rather than General ABAP.....so i have no idea about scope and benifits of SAP XI .plz suggest me if ON-LINE training in SAP XI would be good choice for me or not..bcoz i have planned to do this certification by taking education/personal loan....so i thought to take suggestions from you b4 taking a huge loan.
    need your valuable suggestions.
    thnx
    Prashnat Tiwari

    Hi Prashant,
    Certification is only an added advantage to ur career not a need. I wud suggest if u r workin in any company and have 3 yrs exp in ABAP then give certi through SAP Tech Ed as the price will be less around 12k whereas it will b more in institutes.
      XI is basically migration within SAP. Since there are a big bunch of ABAP ppl Siemens might have asked you for XI certi. To be more clear about XI follow this link:
    /thread/929581 [original link is broken]
    But i would rather suggest that instead of taking loan for mere certification get some hands on exp in any company and apply thru SAP Teched for certification.
    Regards
    Priyanka

  • Need informations about abap-hr

    Hi Guys,
    I need ebooks on ABAP HR. or some useful documents about abap-hr.
    Logical databases / Infotypes/Macros..etc
    Anybody can send me . It's important.
    Thanks

    hi,
    You can gothrough the below links.
    /people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports,I
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://www.hernangn.com.ar/sap.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    Thanks,
    -Suresh Revuru

  • Is Logical Database used in ABAP?????

    Hi All,
    I m very confused whether LDB's are used in ABAP or not.
    i have undergone a small training in ABAP-HR (HCM).
    In that training i was told that there is an advantage in HCM that LDB's are used here
    which were not used in ABAP.
    And i have read somewhere that LDB's are used in ABAP.
    can plz sumone give a light on this.
    Thanks,
    Sonali

    hi,
    The use of a logical database provides you with an alternative to having to program database accesses individually. Logical databases retrieve data records and make them available to ABAP programs.
    The same logical database can be the data source for several Quick Views, queries, and programs. In the Quick View, the LDB can be specified directly as a data source. A query works with the logical database when the functional area that generated the query is defined with a logical database. In the case of type 1 programs, the LDB is entered in the attributes or called using function module LDB_PROCESS. See appendix for information on how to use the function module.
    Logical databases offer several advantages:
    The system generates a selection screen. The use of selection screen versions or variants provides the required flexibility.
    The user does not have to know the exact structure of the tables involved (especially the foreign key dependencies); the data is made available in the correct order at GET events.
    Performance improvements within logical databases directly affect all programs linked to the logical database, without having to change the programs themselves.
    Maintenance can be performed at a central location.
    Authorization checks can also be performed centrally.
    A logical database is an ABAP program that reads predefined data from the database and makes it available to other programs.
    A hierarchical structure determines the order in which the data is supplied to the programs. A logical database also provides a selection screen that checks user entries and conducts error dialogs. These can be extended in programs.
    SAP provides some 200 logical databases in Release 4.6. The names of logical databases have been extended to 20 places in Release 4.0 (namespace prefix max. 10 characters).
    In the case of executable programs, you can enter a logical database in the attributes.
    Use the NODES statement to specify the nodes of the logical database that You want to use in the program. NODES allocates the appropriate storage space for the node - that is, a work area or a table area depending on the node type.
    The logical database makes the data records available for the corresponding GET events.
    The sequence in which these events are processed is determined by the structure of the logical database.
    Logical databases are made up of several sub-objects. The structure determines the hierarchy, and thus the read sequence of the data records.
    Hope this helps, Do reward

  • Need to write ABAP Routine at infopackage Selection Options

    Hi All,
    I need to write ABAP Routine at Info Package Selection Options.
    Requiremnet i need to bring  some Sales Document Types (Sales Orders Types) only from R/3.
    Ex I need OrderTypes ZQT,ZSIV etc
    Can any body help to resolve this.
    Regards,
    P.C.V.

    Hi P.C.V,
    If the order type field is already available in the Data Selection Tab of the InfoPackage, then you just need to place your selections there (e.g. order type = ZQT, ZSIV) without the need to use ABAP routines.
    If ever you really need an ABAP routine, here is an example ABAP routine. The most important concept is to modify the range table l_t_range so that the selection reflect what you need.
    data: l_idx like sy-tabix.
    data: w_startdate like sy-datum,
          w_startweek like scal-week,
          w_maxdate like sy-datum,
          w_maxweek like scal-week.
      w_startdate = sy-datum.
      w_maxdate = w_startdate + 104 * 7.
    * Calculate horizon for extraction
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          DATE         = w_startdate
        IMPORTING
          WEEK         = w_startweek
        EXCEPTIONS
          DATE_INVALID = 1
          OTHERS       = 2.
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          DATE         = w_maxdate
        IMPORTING
          WEEK         = w_maxweek
        EXCEPTIONS
          DATE_INVALID = 1
          OTHERS       = 2.
              read table l_t_range with key
                   fieldname = 'CALWEEK'.
              l_idx = sy-tabix.
              l_t_range-sign = 'I'.
              l_t_range-option = 'BT'.
              l_t_range-low = w_startweek.
              l_t_range-high = w_maxweek.
              modify l_t_range index l_idx.

  • Why does logic need to be "warmed up"?

    Whenever I start logic pro 7.1.1 and load up my most recent song, I always have to go through a series of core overloads. Most of my softsynths ( I typically use around 25 ) are EXS24 samples, and it seems as though whenever I load up an instrument I have a huge spike in CPU when a new note is played for the first time, and then it plays fine after that. The problem is when I load up a song and press play, I have to go through an annoying and tedious series of core overloads every time a new note is played until logic cashes all of the notes and I can actualy get to work. Is there any settings that I should change so logic will play the song the first time?
    My core audio settings
    256mb buffer
    larger disk buffer
    medium process buffer range
    power book g4 1.5ghz 512mb ram logic 7.1.1 pro

    512mb ram
    That's problem #1
    larger disk buffer
    Not a good idea, in view of your low RAM.
    Are you using an external drive for your projects?
    Having said that, I know this has been mentioned here before, so you might want to search for EXS24+missing notes. I think it was iSchwartz that had a theory about this - but I know that even with plenty of memory it seems that Logic needs its pump primed sometimes.

  • Need to create ABAP proxy in ECC 6.0

    Hi All,
              I need to create Abap proxy in ECC 6.0 .Tha actual senerio is iam getting data from XI in XML format and i need to validate and update the date in the ZEE table fields respectively.i need to Modularize the class and keep the validation part separate. we should do validation framework for custom Master Data objects which can be turned On and Off. This can be used as a common framework for all master data validations.can any one guide me how to create abap proxy from staring till end ...Thanks in advance ...
    Regards,
    SRIram

    Hi,
    I got these below steps from SDNforumonly ..i do not have the link however i have the steps:
    1.check Delivered Languages service.sap.com/languages.
    2.check note 42305
    3.In transaction SMLT , Choose Classify Language (Language symbol or F5 )
    4.Supplement this language with English or German (Recommended)
    5.The language must be defined in the instance profiles so that you can log on in these languages. The relevant parameter is
    zcsa/installed_languages.
    6.Go to the language for which you want to install extra packages and choose or choose Language --> Import Package
    7.in the next screen , enter the path for language packages.
    8.start immediately or schedule it .Optionally you can use the target server to exceute this ( to avoid performance issues
    ,if you are importing in production timings, and you cna exculde this server from logon group )
    9.if any problems in importing then analyze the log and restart the import .
    10.After importing the languages, you must also import the language data in the Support Packages.Choose Language --->
    Special Actions ---> Import Support Packages
    11.Go to the language that you want to supplement and choose or Language ---> Supplement Language(this is client specific ,
    so execute for each client in your system)
    And also to the above if your system is running on non unicode you need to install the code pages (example AIX locale command) .
    Thanks.

  • Need faqs on ABAP HR basics

    Hi folks,
              I need faqs on ABAP HR (with answers).  Could any body send me some material to attend interview on ABAP HR.Please i want with ansers as i amvery new to ABAP HR.
                Thanks,
               Shyam.

    Shyam,
    your question not lie under
    rules of engegement
    there is plenty of thread of question in HR are they not question in itself you need to watch them.
    Amit.

  • Need documents of ABAP Object Oriented concepts

    Hi,
    I  need materials on ABAP Object Oriented Concepts to learn.
    If you have any good documents which covers all the topics of ABAP OO then please send me to [email protected]
    Thanks in advance.
    Regards,
    Chandru

    Chandra,
    Very good sites with docs.
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    Pls. reward if useful...

  • Things that Logic needs to be #1!!!!

    I think Logic needs to do some work on the waveform edit.
    More like Pro Tools.
    Right now, the main thing i miss is not to be able to quantize an Apple Loop. I mean, some parts of the loop that are offbeat are impossible to quantize.
    Message was edited by: Bob Antis

    Yes,i mean the blue apple loops.
    I wouldn't even mind if i could tweak the normal aiff loops like Ableton Live or Pro Tools, to be able to quantize by yourself with precision!
    I think Apple should include that in their next update, it's so important for waveform editing. My self, i edit a loop in Pro Tools,then export it and work it in Logic, it's so frustrating!!!

  • Need help in abap logic

    I am facing problem in abap program.
    Requirement :
    i want to print the data like this
    delivery no-  item-  from batch-   to batch -   material shade-   no of cones-   netwt-   grosswt-   no of bags.
    delivery no & item from lips-vbeln  lips-uecha field table.
    against this i will be having no of batch in lips-charg field. 
    batches may be in order or may not be there.
    Against this each batch i will get  shade, no of cones, netwt, grosswt, from batch classification.
    mch1,ausp   table.
    on change of any of the above items or batch order i must print it with a new line.
    example.
    say supose if delivery 100  item 10 contains ABC001 batch to ABC008  batch ,
    CDE 009 to CDE010, XYZ012, PQR013 batch.
    this batch number contains characters and numeric.
    i want to print like this
    delivery___item__frombatch__to batch____shade__noofcones__netwt___grosswt____no of bags
    100______10____ABC001____ABC008___black__40_________50 kg__50.4 kg_____8
    _______________CDE009____CDE010___black__50_________50 kg__50.4 kg_____2
    _______________XYZ012_____XYZ012___black__50_________50 kg__50.4 kg_____1
    _______________PQR013____PQR013___black__40_________50 kg__50.4 kg_____1
    can u any please help me how to build the logic.

    Hello Navin,
    You've got to give control break points within the loop, to fix the problem.
    LOOP AT T_TABLE INTO FS_TABLE.
      AT NEW FIELDNAME1.
        WRITE:/ FS_TABLE-FIELDNAME1.
      ENDAT.                                   " AT NEW FIELDNAME1
    AT NEW FIELDNAME2.
       WRITE:/ FS_TABLE-FIELDNAME2.
    ENDAT.                                     " AT NEW FIELDNAME2
    * Fieldname3 will be printed below distinct Fieldname2. Fieldname3 is printed as bunch.
       WRITE:/ FS_TABLE-FIELDNAME3.
    ENDLOOP.                                " LOOP AT T_TABLE INTO FS_TABLE
    Note:
    Try giving ON CHANGE OF T_TABLE-FIELDNAME.
    This is an obsolete statement, but this really does well, in case of printing Currency or Date.
    Usually, date and currency fields are printed
    Rs.****.**
    LOOP AT T_TABLE INTO FS_TABLE.
      ON CHANGE OF FS_TABLE-FIELDNAME1.
        WRITE:/ FS_TABLE-FIELDNAME1.
      ENDON.                                   " ON CHANGE OF FS_TABLE-FIELDNAME1
    ON CHANGE OF FS_TABLE-FIELDNAME2.
       WRITE:/ FS_TABLE-FIELDNAME2.
    ENDON.                                     " ON CHANGE OF FS_TABLE-FIELDNAME2
       WRITE:/ FS_TABLE-FIELDNAME3.
    ENDLOOP.                                " LOOP AT T_TABLE INTO FS_TABLE
    Try with the concept above, hope you'll get the solution.
    Thankyou,
    Zahackson

  • Need some GENERAL IDEAS on the following PREREQUISITE for ABAP training

    Hi,
    e.g. Is u201CLogon and structure of the user interfaceu201D just knowing how the user interface looks like and where to find the various options as a user? Or, is there much more to it which may be critical to the understanding of the ABAP course that I am scheduled to take? I will appreciate clarification with examples on each line below:
    1.  Navigating in SAP systems
         --Logon and structure of the user interface
         --Accessing functions in the system
         --Personalization options
    2. SAP NetWeaver Application Server architecture
         --Processing a user query
         --Structure of an instance
         --Work process types, server processes and their use
         Internet-based technology components:
    3. Overview of the SAP development environment
         --Creating and editing Repository objects
         --Transports between SAP systems
         --Communication and integration technologies
         --Introduction to SAP system administration
    Thanks

    1. Navigating in SAP systems
    --Logon and structure of the user interface
    --Accessing functions in the system
    --Personalization options
    No, this is really nothing more than an introduction for people that have never seen a SAPgui screen before.  Most ABAPers can skip right over this course.  If you understand the NetWeaver architechure, then I would suggest to start withe BC400.
    Regards,
    Rich Heilman

  • Logic needed in query

    Hi all
    i have a table with columns
    SUN MON TUE WED THU FRI SAT
    Y................ ........Y..................
    i need to selected the column SUN which is Sunday,
    along with this i need to select the columns MON,TUE
    THU is having value so i don't needed that
    if i select WED then i needed THU, FRI, SAT also
    can u pls help on this.
    Edited by: 881121 on Apr 5, 2013 11:13 PM

    user648773 wrote:
    You need to return the name of days? or you need to return the values of the colum?
    You have onley two cases? or could be more? could you describe the logic in general?
    one query always return the same number of colums. So, in your case you should return one column and concatenate the values as you need.
    here is an example with concatenate, and return the correspondig values:
    select out
    from
    select case
    when SUN = 'Y' THEN SUN||MON||TUE
    WHEN WED = 'Y' THEN WED||THU||FRI
    END out
    from table
    here is an example that return the name of days:
    select out
    from
    select case
    when SUN = 'Y' THEN 'SUN,MON,TUE'
    WHEN WED = 'Y' THEN 'WED, THU, FRI'
    END out
    from table
    May be you could do these things to describe us what you need:
    - make a desc of you table to know the structure.
    - describe each case with an imput and it corresponding outpu.Maybe everything would be easy if you would post:
    1) CREATE TABLE and INSERT statement
    2) Expected output.
    You question is vague and not clear. Please read SQL and PL/SQL FAQ
    This will avoid people here trying to guess what you are trying to say.
    Also keep in mind: when you put some code or output please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    Regards.
    Al
    Edited by: Alberto Faenza on Apr 8, 2013 2:09 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for