Amount to be passed to F-53

Hi All ,
I am passing amount value ( source BSIK-WRBTR ) to F-53 for clearing the liability Document.
I have created one liability document of KWD currency valued 1300.000 KWD.
However when i fetch data from BSIK-WRBTR , the value is fetched as 13000.00
instead of 13000.000 KWD which is wrong.
I want to pass the value as per the document currency with correct decimals.
Thanks,
Sudeep

Hi Sudeep
This problem is due to the fact that ,in standard SAP ,for currency KWD decimal places are maintained in table TCURX.When dealing with currencies which have an entry in table TCURX,before moving the value to the target field you should populate the currency key field with relevant currency,in this case it is KWD.Hope this helps.You must have noticed while creating tables with currency fields ,it always ask for a reference currency key field.
Kind regards
Manoj

Similar Messages

  • Error in upading the net price amount for the PO line item

    Hi all,
    I'm using the 'BAPI_PO_CHANGE' for inserting a NEW PO line item for the given purchase order no(PO).   A new item number has been generated. But the amount which i pass for NET_PRICE is not updated correctly.   It takes some other value instead of the value i give.  
    For some PO, its working correctly.   But for some other, its not..
    Could anyone pls tell me why this problem occurs, and what are all the STRUCTURES, and TABLES inputs needs to passed for creating a new PO line item?..
    Its very very urgent..
    Could anyone pls help..
    Regards,
    Shanthi

    Hi,
    Please reward points if it helps
    PURCHASEORDER - Import Parameter
    *POITEM-NET_PRICE - Table Parameter ,here need to pass
    Item number,Material Number,Qty fields*
    Thanks
    Vikranth

  • Updation of tax amount via FM IDOC_INBOUND_SINGLE

    Hi All,
    I am having a requirement in which I am using a custom function module to create and post an IDOC. The program is taking data from flat file and passing it to the function module IDOC_INBOUND_SINGLE which calls a BAPI BAPI_ACC_INVOICE_RECEIPT_POST to post the IDOC.
    For posting IDOCS, IDOC type ACC_INVOICE_RECEIPT03 is being used.
    The IDOC, if posted successfully update data in BSET table. But the posting is not updating the 'Tax in local currency' (HWSTE) field in BSAT table.
    It seems it is not calculating the Tax amount.
    I am passing the tax code and the total amount to the IDOC. I wanted to know whether the FM IDOC_INBOUND_SINGLE internally calculate the tax amount (Tax code gives the tax percentage and the total amount is being passed by me)
    Also in the IDOC type ACC_INVOICE_RECEIPT03 there is no segment in which there is a field for Tax amount to be passed.
    Please help me as to how the tax amount will reflect in the BSAT table.
    Thanks in advance.
    regards,
    gaurav

    that is really weird! You can try one more thing.. See if you can create more than one Address with subty 1 ie infotype 0006 subty 1 for an employee in PA30. If the system allows it, the problem is not with the BAPI..but with the Time Constraints..
    Regards,
    Suresh Datti

  • How to Reduce BED Payable amount

    Dear All,,
    Kindly tel how to reduce BED Payble amount.
    But I tried in J1IH AND J1IS but i am not able to reduce BED Paybale amount.And i passed Jv for that Gl account it only decrease Gl balance but not Decrease J2IUN balance.
    Kindly suggest me how to come out of this
    Thanks and Regards
    Girish.

    Dear,
    In J2IU you have to utilize BED payable against the BED recoverable. Then net amount is paid in following steps,
    Step 1. FB50, create document for payment of excise duty.
    Step 2. Create TR6 challan through J1IH using above generated document number.
    Regards,
    Chintan Joshi.

  • Convert foreign currency amount

    hi guys,
    i have PR with amount 3,600,000 and document ccy is IDR. Our local ccy is RM.
    I have automatic program to create PO using fm BAPI_PO_CREATE1 and i just pass the eban-netpreis value .
    Since it is in doc ccy, the amount is stored as 36,000 and the PO was wrongly created with 36,000 amount which is supposed to be 3,600,000.00
    How to pass the exact value to PO internal table?
    my coding
    DATA:  g_ftotal(20) TYPE c.
    WRITE ieban-preis CURRENCY ieban-waers TO g_ftotal.
    g_ftotal is now 3,600,000.00 as character amount, how to pass it to BAPIMEPOITEM-NET_PRICE which has type DEC 28 and  9 decimal points

    Hi,
    Following are the BAPI's for the same:
    BAPI_CURRENCY_CONV_TO_EXTERNAL Conversion of Currency Amounts into External Data Format
    BAPI_CURRENCY_CONV_TO_EXTERN_9 Conversion of Currency Amounts into External Data Format
    BAPI_CURRENCY_CONV_TO_INTERNAL Conversion of Currency Amounts into Internal Data Format
    BAPI_CURRENCY_CONV_TO_INTERN_9 Conversion of Currency Amounts into Internal Data Format
    Best regards,
    Prashant

  • Excise duty from Delivery excise invoice posted

    Dear Gurus of SAP
    I have major problem if some one can help me out it will great.
    We r using TAXINJ PROCEDURE FOR Tax.
    When ever there is a price revison there is a duty difference between duty posted in rg23d and Duty calculated during sales order/invoice.
    Currently we are using Routine 355 Ffor JMOD in SD pricing procedure and 363 in tax procedure.
    For JMOD IF we use routine other than 355 during invoice it throws zero value.
    As riutine 356 is based on Reg23d We tried with that bt for this value  shown in invoice is zero.
    If any one has solution pelase let me know at the earliest.
    I was struggling foor past two days fto solve this issue.
    rgds
    BJ

    the difference amount has to passed into SAP by doing an Excise JV in <b>T.code: J1IH</b> - Other Adjustment. Contact your FI consultant for doing the same.
    Rewards if it is helpful.
    Regards,
    Anbu

  • TS1398 I am unable to connect wifi on my phone 4s since last 2 weeks... I am living in shanghai and did not have this issue since 2 weeks... iPad works fine... Please suggest some measures... Tried the on off reset settings etc.

    I am unable to connect wifi on my phone 4s since last 2 weeks... I am living in shanghai and did not have this issue since 2 weeks... iPad works fine... Please suggest some measures... Tried the on off reset settings etc. but no luck ...
    In fact after updating the software to the latest version I am having more of this... Sometimes the wifi button freezes an I can't even slide it to on / off...
    Thanks

    Noooo! Actually I too had d same prob wit my iPhone 4S. When I connect to my wifi network it won't get connected or it wil be grey scaled! I took it to d istore and since I had warranty they replaced my IPhone. It iPad charger has high volt than ur iPhone charger so when u connect wit it, there is a chance where large amount of current passes thru ur iPhone. So for sure it wil damage ur motherboard and its parts! Many said that iOS 6 or 6.0.1 or 6.1 was d reason for tis wifi prob! But apple never made its mistake wit it's software. If and only if u hav hardware prob u wil hav these sort of wifi prob Bluetooth prob! So best way s to replace ur iPhone!

  • Unable to provide input value to InfoObject in SEM-BCS

    Hello BI Experts,
    I have created an infoobject 'ABC' in BI and have flagged 'With Master Data' and 'With Text'.  This infoobject has an navigational attribute 'XYZ'(XYZ also has 'With Master Data' and 'With Text').
    When I go to T.Code UCWB(BCS Workbench), I could able to see the infoobject 'ABC' and when I try to create master data for 'ABC', I do not see the input field for 'XYZ'.  I want to input values in Infoobject 'XYZ' through this screen(SEM-BCS) and not through BI(right-click on infoobject 'Maintain Master Data).  Please let me know, if I am missing anything.

    Hi Shekar
    I find the ICD setup very 'picky'! If you get one thing wrong, it doesn't work. I have detailed below the steps I usually advise people to tek. Check your setup and see if this helps.
    1. Define Plan Type, Compensation Category = Others.
    2. Define Plan. Link to Plan Type. Plan Usage = May not be in program. On Not in program Tab - define sequence, currency, enrollment rate (per pay period?), activity reference period (Monthly). Your settings may need to be different. On Plan details tab, enter plan years.
    3. Plan enrollment requirements. On the general tab, plan sub tab, make sure the method = EXPLICIT. this allows the user to enter an input value for the ICD. THIS MAY WELL BE THE SOURCE OF YOUR PROBLEM!
    Make sure the CERTIFICATION region is UNTICKED. This can also cause ICDs not to work.
    ALLOWS UNRESTRICTED ENROLLMENT must be TICKED. Otherwise there is no eligibility to the ICD.
    On the rates subregion, make sure the run strt date is set to ENTERABLE.
    4. standard Rates form. Make sure the ACTIVITY TYPE and TAX TYPE are entered. Select the ELEMENT and the INPUT VALUE and TICK the ELEMENT AND INPUT VALUE REQUIRED field.
    On the processing Information tab - TICK ASSIGN ON ENROLMENT, DISPLAY ON ENROLLMENT and PROCESS EACH PAY PERIOD. Enter PER PAY PERIOD AMOUNT in VALUE PASSED TO PAYROLL and OTHER in COMPENSATION CATEGORY.
    Let me know if this works!
    Regards
    Tim

  • DPS Feedback From Client: A Book Publisher's Perspective

    Greetings,
    I thought it might be helpful to both Adobe and other publishers to post some real-world feedback from one of our clients.
    But first, some background:
    We are a book publisher moving into the realm of book apps. Our book apps or not at all like their printed counterparts and mix in a bunch of new content and interactive features. Our apps are also not like magazines, which is what DPS feels like it was designed for.
    We've been doing some testing with DPS, especially as it relates to a business model for us and our clients. We've also been testing resolutions, and figuring out the differences between single-issue and multi-issue apps.
    I posted an overview of where our tests led us in terms of single vs. multi, here:
    http://forums.adobe.com/message/4333151#4333151
    and I posted some resolutions tests to see if an iPad 1/2 resolution app would look "good enough" on an iPad 3 (or the new iPad), here:
    http://forums.adobe.com/message/4333426#4333426
    and finally an overview of what we hope Adobe will do with single-issue apps and renditions, here:
    http://forums.adobe.com/message/4333494#4333494
    Below is a continuation of our DPS discovery process. At the same time we are exploring HTML5/CSS3/Javascript development with Baker. Although we've developed our own webapps, run everything in Amazon's cloud (ec2, s3) and have a development team familiar with everything needed to get a book app out via HTML, we are giving DPS a fair shot because we've invested so much money in Adobe's software and we'd rather our production team handle book apps instead of our development team.
    With all of that said as a backdrop, we presented an interested client with the option of publishing two single-issue apps (iPad 1/2 and iPad 3) or publishing one multi-issue app.
    Pricing wise, we kept our design fees the same with either option. The only pricing difference was $395x2 for the single-issue app route vs. a monthly charge to help us offset Adobe's monthly charge for the multi-issue app.
    The questions from the client and answers from us went like this, in roughly this order:
    Q: With the single-issue app, we don't pay an ongoing monthly fee?
    A: Correct. It's just the up-front per-app fee.
    Q: And in the multi-issue app arrangement, it doesn't matter how little our sales trickle in 6-9 months down the line, we're still paying the monthly fee if we want to have the app for sale at all?
    A: Yes.
    Q: Does either option limit us in terms of how long the app will be available for download?
    A: No. Both options allow for ongoing sales of the app. The primary difference being you pay monthly to keep the app "alive" for multi-issue apps whereas single-issue apps live indefinitely with no monthly cost.
    Q: So it seems like single-issue apps are the way for us.
    A: From a pricing standpoint alone, yes, because most of your app sales will occur in the first month or two and single-issue apps do not carry any monthly costs down the line. That said, single-issue apps have some serious limitations.
    Q: Like?
    A: For starters, we would have to develop two apps to target iPad 1/2 and iPad 3.
    Q: So the customer would have to make the choice? We are expecting the customer to get  technical and figure out which app is for their device?
    A: Yes. Renditions only exist in multi-issue apps, currently.
    Q: Let's suppose we can get over that because eventually we will want to develop an Android version and a Kindle Fire version and in that case we are expecting customers to know which app works on their device...
    A: Let me stop you there. Single-issue apps only work for iPad.
    Q: So if we go the single-issue route, we simply can't ever develop an Android or Kindle Fire app?
    A: Not as a single-issue app for any other platform than iPad. If it was essential you release on other platforms, we could look into converting the single-issue app into a multi-issue app later on, although we'd be looking at that monthly charge again.
    Q: Right, which simply doesn't make sense for our app because of its timely nature.
    A: We agree. Let's give up developing for other platforms for now and even indefinitely and focus in on just the iPad single-issue app development.
    Q: Okay. So we release two apps, one for iPad 1/2 and one for iPad 3 using single-issue apps. What if we want to update the app down the road? Do we update both apps at once?
    A: Actually, with single-issue apps, you can't update the app. Once it's submitted to Apple, it's locked in once and for all. Only multi-issue apps can be updated.
    Q: That's another serious issue for us. Are there any other limitations we haven't discussed?
    A: There are two more limitations: 1) Single-issue apps rely on the latest version of Adobe Content Viewer approved by Apple. Currently, version 19 of Adobe's DPS tools work with the Adobe Content Viewer that's approved and live in the App Store. That means we can develop your app using v19 of Adobe's tools but will have to hold off on updating to v20. This isn't so much a real issue as a potential issue. If, for example, v20 has some killer feature you really want to have, we simply couldn't use it. 2) Single-issue apps have no analytics.
    Q: With all of these limitations, we're going to have to discuss internally which way to go. What's your recommendation?
    A: All things considered, we think single-issue apps is the best solution now for your app. We have no exact target sales numbers in mind, but it's almost a certainty you will sell 80% of all app sales in the first 1-2 months. Knowing you want to keep the app available indefinitely means a single-issue app is the only way to go.
    After two days and a few conference calls, the client decided to move forward with two single-issue apps, although a bit begrudgingly. We didn't pull any punches and let them know we expect Adobe to spend some time refining their pricing strategy and unifying the feature set as the technology starts to grow up. At this point, the seemingly wonky pricing structure and feature parity is the cost of being on the bleeding edge.
    And we are now jumping into developing the app with DPS for our client. I should say, however, we are also working quickly to come up with a viable HTML5 route for publishing to avoid Adobe's system altogether. At this point I anticipate we will move to HTML in the next 2-5 months if Adobe's pricing/features don't start to move toward what we need. If we do jump to HTML, the answer to most clients' questions will be, "we can do that; for cheap; on all devices" and so on, which is a pretty attractive thing.
    This ended up being considerably longer than I had originally envisioned, but my hope is it is useful for Adobe in refining the product and helpful for other publishers just starting down the DPS path.
    Thanks,
    Chris

    Alistair,
    Agreed. It wouldn't be right for us to pass on Adobe DPS' entire monthly charge to one client, and we have no plans to do so. We are still fine tuning the amount we would pass on to each client.
    From our perspective, we are hesitant to invest anything at all in the multi-issue route because other paths to digital publishing/apps are looking more and more attractive. If we put out a handful of DPS multi-issue apps now (say, 4-5) then jump to HTML in 3-6 months, we will have to maintain Adobe's monthly fee indefinitely for the first 4-5 apps. It's as if we are paying Adobe for the right to be locked into paying Adobe monthly. No thanks.
    From the client's perspective, even if the monthly amount we pass on is minimal, simple math shows at some point monthly sales will not cover the monthly carrying cost. When that point comes is pretty crucial to figure out, but it's likely it will come in month 2 or 3, which means the client would be forced to pull the app from the app store just 2-3 months after its release.
    I keep trying to find a parallel for the business model in this new book app world. What is Adobe's role if we were talking traditional book publishing?
    - The book store? No, that's the role of whichever app store the app is sold through (Apple's App Store, Android Market, etc.).
    - The distributor? Possibly, since you could consider Adobe hosting the files as a type of distribution service (although, I'd prefer to host it all myself). If Adobe is the distributor, $0.30/download seems reasonable.
    - The press? I suppose this could be argued since Adobe takes an input of files and outputs an app like a press takes an input of files and outputs a printed product. That's sorta like a press. But if that's the case, a per app fee (or even a per download fee) makes more sense than a monthly carrying cost. We don't pay our presses monthly after they've printed our books for the right to sell them. 
    Obviously, there's a flaw in thinking about this new world in old ways, but I'd still like to figure out exactly what Adobe's role is and why we (or our clients) would pay Adobe monthly. If, for example, Adobe's pricing scheme was something more like $400 per app created (with all features like renditions, updates, social sharing, etc.) + $0.30 per download to host the file with an option to bypass Adobe's (shaky) hosting service, we'd jump into DPS with no reservations and be publishing dozens of apps per year. Instead, we're dabbling with publishing one app and working as quickly as possible to find other solutions, which would eventually lead to converting our Adobe Create Suite based production team to an HTML/CSS/Javascript team.
    Thanks,
    Chris

  • Key Figure format in Years and Months..

    Hi,
    Is there any Key figure similar to 0SRVCLENKYF (Length of Service (in Years)) part of Headcount and Personnel Actions, which should give me value in Years and Months..?
    Thanks in Advance,
    Thanks,
    Madhu.

    For curiousity sake...if you use the FIMA_DECIMAL_MONTHS_AND_YEARS Function Module, the output that you'll get is a months and years in fractional amounts. So, how are you going to get the Years and Months from this?
    For example, if the from date is 20000101 and the to date is 20090914, the results from this Function Module will be Months = 116.42740 and Years = 9.70228. If you do use this, I'd suggest taking the whole number from passed value for years (9 in this example) and then calculate months by taking the franctional amount of the passed value for years and multiple it by 12 (0.70228 * 12), you end up with 9 Years, 8 Months (8.42736 to be exact, but you're going to want to truncate it to 8 so that when it goes above 8.5, the value doesn't become 9 when it still should be 8).

  • How to findout line  items of zero balance clearing account?

    Hi Friends,
    my zero balance clearing account shows balance.
    we have 6 business areas and document splitting activated.
    Trial balance is matching at co.code level.but its mis matching at business area level.
    Line item management is checked in the master data of zero balance clearing account.
    How to find out the line items of the zero bal.clearing account so that i ll get the relevant business area amount and ll pass journal entry accordingly and ll get the balanced trial balance at business area level.
    What is the table for zero balance clearing account line items?
    suggest.
    Regards,
    Sumeay

    Dear
    I am also facing the same problem. We are having 7 business areas. Trial balance is tallied even at busness area level. However, the zero balance clearing account is showing balance in each business area ( we can say "inter business area balncess.").
    Please help
    Regards.

  • Apple TV Remote hidden controls

    Are these controls legit? While in know some of these are simple and work on the device without much risk, I don't want to blow my device trying out unknown/new control.
    Restart Your Apple TV
    p><span>This is my favorite tip on this list because I frequently find myself navigating into the Apple TV’s layered Settings screens to restart the device whenever it gets <a href="/glossary/wi-fi" title="Wi-Fi is a way of wirelessly connecting to the internet over a broadband connection." class="lexicon-term">Wi-Fi</a> issues. Well, no more! Simply press and hold the DOWN and MENU button at the same time for six seconds to restart your Apple TV.</span></p>
    h3 dir="ltr"><strong>Sleep Your Apple TV</strong></h3>
    p><span>You can also quickly put your Apple TV to sleep using the remote. Usually it goes to sleep at after a predetermined amount of time passes. To make that happen sooner hold the PLAY/PAUSE for five seconds.</span></p>
    h3 dir="ltr"><strong>Get To Home Screen Instantly</strong></h3>
    p><span>Sometimes you can be knee deep in submenus on the Apple TV, especially when using some third-party channels. The good news is you don’t need to back out of each sub-menu step by step. Simply press and hold the MENU button on the Apple TV remote for three seconds and you’ll be taken to the Home screen right away.</span></p>
    h3 dir="ltr"><strong>Arrange / Hide Channels</strong></h3>
    p><span>For the longest time the layout of the Home screen was fixed, but then in a software update last year Apple finally added the ability for the user to rearrange and hide channels. This no doubt came in response to the increased availability of third-party channels on the Apple TV--some of which a user may never have an interest in viewing.</span></p>
    p>To rearrange channels simply hold down the SELECT button for two seconds. The channel icons will jiggle. Use the DIRECTION arrows to move the selected channel. Or press the PLAY/PAUSE button to hide an channel.</p>
    h3 dir="ltr"><strong>Rewind / Fast Forward At Different Intervals</strong></h3>
    p>Everyone knows you can use the left and right direction pad to skip backwards and forwards, but you can actually use the same left and right buttons on the direction pad to rewind and fast forward at different intervals. Hold the LEFT button to rewind 30 seconds. Press the LEFT button to rewind continuously. Alternate your rewind speeds further by pressing LEFT once each time to cycle through slow, medium, or fast rewind.</p>
    p><span>The opposite applies to fast forwarding as well. Hold the RIGHT button to fast forward 30 seconds. Press the RIGHT button to fast forward continuously. Alternate your fast forward speeds further by pressing RIGHT once each time to cycle through slow, medium, or fast fast forward.</span></p>
    h3 dir="ltr"><strong>Go Slow-Mo</strong></h3>
    p><span>This one is really cool. You can rewind or fast forward through video in slow motion on the Apple TV. To do this simply press the PAUSE button then press the LEFT or RIGHT button to rewind or fast forward in slow motion.</span></p>
    h3 dir="ltr"><strong>View Video Settings</strong></h3>
    p><span>Sometimes you might want to adjust audio or other settings for a video that is already playing. You can use the Apple TV remote to quickly do this by pressing and holding the SELECT button for three seconds while the video is play. This will bring up the video’s settings including subtitles, speaker settings, audio, and closed captions.</span></p>
    h3 dir="ltr"><strong>Mark Episodes As Watched</strong></h3>
    p><span>Many times we have full TV series we’ve bought via the iTunes Store that we watch on the Apple TV. However most of the time we’ve already seen some of the episodes in each season. This tip allows you to use the Apple TV remote to mark episodes as already watched. To do this you need to be in the iTunes TV Shows channel on the Apple TV. Select the episode you want to mark as watched and then press and hold the SELECT button. You can also mark entire seasons as watched by selecting the season and then pressing and holding the SELECT button as well.</span></p>
    h3 dir="ltr"><strong>Pair / Unpair Apple TV Remote</strong></h3>
    p><span>If you’ve got lots of Apple TV’s in your house you may have some remote conflicts. The good thing is you can quickly pair and unpair remotes simply by using...the remote. To pair a remote to an Apple TV press and hold the RIGHT and MENU buttons for five seconds. To unpair a remote from an Apple TV press and hold the LEFT and MENU buttons for five seconds.</span></p>
    h3 dir="ltr"><strong>Switch On-Screen Keyboards</strong></h3>
    p><span>Using the on-screen keyboard is one of the chores of navigating the Apple TV. You’ll use this keyboard whenever you need to enter login information (say, for Netflix) or when you are searching for a show. Thankfully the Apple TV remote has these hidden controls to make using the keyboards easier.</span></p>
    p><span>Press PLAY/PAUSE when entering text to switch between the alpha, numeric, and symbol keyboards. You can also hold down the SELECT button for two seconds to bring up the accented characters and then press PLAY/PAUSE to select the one you want.

    Welcome to the Apple Community.
    If you don't want to use a remote with your computer the easiest thing to do is just to turn the IR off. (System_Preferences/Security/General)
    If you still want to use your computer remote then you must pair your computers remote with the computer AND the Apple TV remote with the Apple TV.
    To pair a remote with a device hold down the menu and FF buttons together for six seconds or until you see a chain icon on screen (best take the computer into another room, or turn it off, when you do this)

  • BAPI_PO_CREATE

    Actually I don't have much time left so I though of posting this thread again, I am working on an interface where I need to create PO's using BAPI_PO_CREATE but to my bad luck the code that I have written is not working properly and I have just about an hour left to subit the program to my manager so can you please help me to get out of this very critical situation. I have written the following code,
    internal table to store the data
    data:  poheader LIKE bapimepoheader,
           poheaderx LIKE  bapimepoheaderx,
           poitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE,
           poitemx LIKE  bapimepoitemx  OCCURS 0 WITH HEADER LINE,
           return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
           return2 LIKE  bapiret2 OCCURS 0 WITH HEADER LINE,
           exppurchaseorder  LIKE  bapimepoheader-po_number,
           poschedule LIKE bapimeposchedule OCCURS 0 WITH HEADER LINE,
           poschedulex LIKE bapimeposchedulx OCCURS 0 WITH HEADER LINE.
    data: begin of it_input_file OCCURS 0,
            ref_no(2),
            c_code(4),
            doc_typ(4),
            doc_date(10),
            vend_no(10),
            purch_org(4),
            purch_grp(3),
            currency(3),
            item_no(3),
            material(18),
            Plant(4),
            Strg_loc(4),
            Quantity(13),
            Price(10),
            ord_unit(7),
            del_date(10),
            seq_num(5) type n,
          end of it_input_file.
    data: it_ref_no_old(2)  type c.
    data: it_record like it_input_file occurs 0 with header line.
    data: it_record_x like it_input_file occurs 0 with header line.
    data: ld_file LIKE rlgrap-filename.
    data: it_ser_data like it_input_file occurs 0 with header line.
    data: begin of it_pipe_data occurs 0,
            line(1000),
          end of it_pipe_data.
    data:  file1(70) type c value '/tmp/test_file_',
           len type i.
    data: begin of it_lfa1 occurs 0,
            lifnr like lfa1-lifnr,
          end of it_lfa1.
    data: begin of it_t001 occurs 0,
            bukrs like t001-bukrs,
          end of it_t001.
    data: begin of it_mara occurs 0,
            matnr like mara-matnr,
          end of it_mara.
    data: begin of it_mard occurs 0,
            lgort like mard-lgort,
          end of it_mard.
    data: begin of it_marc occurs 0,
            werks like marc-werks,
          end of it_marc.
    data: begin of it_t024 occurs 0,
            ekgrp like t024-ekgrp,
          end of it_t024.
    data: begin of it_t024e occurs 0,
            ekorg like t024e-ekorg,
          end of it_t024e.
    data: begin of it_read_file occurs 0,
            line(1000),
          end of it_read_file.
    data: it_file like it_input_file occurs 0 with header line.
    data: begin of it_err_log occurs 0,
            seq_num(10),
            bukrs(4),
            bukrs_err_desc(50),
            lifnr(10),
            lifnr_err_desc(50),
            ekorg(4),
            ekorg_err_desc(50),
            ekgrp(3),
            ekgrp_err_desc(50),
            matnr(18),
            matnr_err_desc(50),
            werks(4),
            werks_err_desc(50),
            lgort(4),
            lgort_err_desc(50),
          end of it_err_log.
    data: v_fullpath type string,
          v_length type i.
    Definition of Variables                                             *
    data: v_semfile like RLGRAP-FILENAME.
    Definition of Constants                                             *
    data: c_bukrs_err_desc(50)           value 'Invalid company code',
          c_currency_err_desc(50)        value 'Invalid valid currency',
          c_lifnr_err_desc(50)           value 'Invalid valid Vendor',
          c_ekorg_err_desc(50)           value 'Invalid valid purchasing Organization',
          c_ekgrp_err_desc(50)           value 'Invalid valid Purchasing group',
          c_matnr_err_desc(50)           value 'Invalid valid Material',
          c_werks_err_desc(50)           value 'Invalid valid Plant',
          c_lgort_err_desc(50)           value 'Invalid valid Storage Location'.
    Selection Screen                                                    *
    selection-screen  begin of block b1 with frame title text-001.
    parameters: p_ifname LIKE rlgrap-filename OBLIGATORY
                    DEFAULT 'C:\'.
    parameter : p_lfile TYPE c RADIOBUTTON GROUP g1,   " local file
                p_ufile TYPE c RADIOBUTTON GROUP g1 DEFAULT 'X'. " Unix file
    selection-screen  end of block b1 .
    selection-screen  begin of block b2 with frame.             " text-002.
    parameters: p_user like sy-uname MODIF ID md1 default syst-uname.
    selection-screen  end of block b2.
    selection-screen  begin of block b3 with frame title text-003.
    parameters: p_upld radiobutton group upld default 'X' ,
                p_upldex radiobutton group upld.
    selection-screen  end of block b3.
    at selection screen
    at selection-screen on value-request for p_ifname.
      call function 'F4_FILENAME'   "allows user to select path/file
         EXPORTING
            program_name  = 'Z_PO_Creation'
            dynpro_number = syst-dynnr
            field_name    =  'p_ifname'
         IMPORTING
            file_name     = p_ifname.
    START-OF-SELECTION *
    start-of-selection.
      if p_upld = 'X'.
        perform build_table.
        perform validate_data.
        perform disp_error_report.
      else.
        if p_ufile = 'X'.
          perform open_unix_dataset.
        else.
          perform open_files.
        endif.
        perform data_process.
      endif.
    perform put_data.
    end-of-selection.
    *&      Form  call_bapi
          text
    -->  p1        text
    <--  p2        text
    FORM call_bapi .
      LOOP AT it_input_file.
    moving header data.
        MOVE: it_input_file-vend_no    TO  poheader-vendor,
              it_input_file-doc_typ    TO  poheader-doc_type,
              it_input_file-purch_org  TO  poheader-purch_org,
              it_input_file-purch_grp  TO  poheader-pur_group,
              it_input_file-c_code     TO  poheader-comp_code,
              it_input_file-doc_date   TO  poheader-doc_date.
    updating header data.
        if poheader-vendor       <> ' '.
          poheaderx-vendor       =  'X'.
        endif.
        if poheader-doc_type     <> ' '.
          poheaderx-doc_type     =  'X'.
        endif.
        if poheader-doc_date     <> ' '.
          poheaderx-doc_date     =  'X'.
        endif.
        if poheader-purch_org    <> ' '.
          poheaderx-purch_org    =  'X'.
        endif.
        if poheader-pur_group    <> ' '.
          poheaderx-pur_group    =  'X'.
        endif.
        if poheader-comp_code    <> ' '.
          poheaderx-comp_code    =  'X'.
        endif.
    moving item data.
        MOVE: it_input_file-item_no    TO  poitem-po_item,
              it_input_file-plant      TO  poitem-plant,
              it_input_file-Strg_loc   TO  poitem-stge_loc,
              it_input_file-material   TO  poitem-material,
              it_input_file-quantity   TO  poitem-quantity,
              it_input_file-price      TO  poitem-price_unit,
              it_input_file-ref_no     TO  poitem-ref_doc,
              it_input_file-ord_unit   TO  poitem-po_unit.
    updating Item data.
        if poitem-plant <> ' '.
          poitemx-plant     =  'X'.
        endif.
        if poitem-material <> ' '.
          poitemx-material     =  'X'.
        endif.
        if poitem-stge_loc <> ' '.
          poitemx-stge_loc     =  'X'.
        endif.
        if poitem-quantity <> ' '.
          poitemx-quantity     =  'X'.
        endif.
      if poitem-price_unit <> ' '.
            poitemx-price_unit    =  'X'.
      endif.
      if poitem-ref_doc <> ' '.
            poitemx-ref_doc     =  'X'.
      endif.
      if poitem-po_unit <> ' '.
            poitemx-po_unit     =  'X'.
      endif.
        poitemx-po_item      =  it_input_file-item_no.
        move: it_input_file-del_date      TO poschedule-delivery_date.
        move: 'X'                         TO poschedulex-delivery_date.
        APPEND:  poitem, poitemx.
        CALL FUNCTION 'BAPI_PO_CREATE1'
          EXPORTING
            poheader         = poheader
            poheaderx        = poheaderx
          IMPORTING
            exppurchaseorder = exppurchaseorder
          TABLES
            poitem           = poitem
            poitemx          = poitemx
            poschedule       = poschedule
            poschedulex      = poschedulex
            return           = return.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          IMPORTING
            return = return2.
        WRITE:/ 'PO created with PO number:' ,
              exppurchaseorder.
      ENDLOOP.
    ENDFORM.                    " call_bapi
    *&      Form  data_process
          text
    -->  p1        text
    <--  p2        text
    FORM data_process .
      if it_input_file[] is initial.
        message E319 with 'There is no data to process!!'.
      else.
        sort it_input_file by ref_no.
        clear: it_ref_no_old.
        loop at it_input_file into it_record.
          if  it_record-ref_no ne it_ref_no_old .
            loop at it_input_file into it_record_x
                 where  ref_no = it_record-ref_no .
            endloop.
            if  syst-subrc = 0 .
              PERFORM call_bapi.
            endif.
          endif.
          it_ref_no_old = it_record-ref_no.
        endloop.
      endif.
    ENDFORM.                    " data_process
    *&      Form  put_data
          text
    -->  p1        text
    <--  p2        text
    FORM put_data .
      it_ser_data-ref_no = '1'.
      it_ser_data-c_code = 'AEM'.
      it_ser_data-doc_typ = 'AB'.
      it_ser_data-vend_no = '100004'.
      it_ser_data-purch_org = 'A001'.
      it_ser_data-purch_grp = '522'.
      it_ser_data-currency  = 'USD'.
      it_ser_data-item_no   = '10'.
      it_ser_data-material  = '1000003'.
      it_ser_data-Plant     = '1005'.
           it_ser_data-Strg_loc
      it_ser_data-Quantity  = '100'.
      it_ser_data-Price     = '2000'.
      it_ser_data-ord_unit  = 'EA'.
           it_ser_data-del_date  =
      append it_ser_data.
      clear it_ser_data.
      loop at it_ser_data.
        concatenate it_ser_data-ref_no it_ser_data-c_code it_ser_data-doc_typ it_ser_data-vend_no it_ser_data-purch_org it_ser_data-purch_grp
                    it_ser_data-currency it_ser_data-item_no it_ser_data-material it_ser_data-Plant it_ser_data-Quantity it_ser_data-Price
                    it_ser_data-ord_unit into it_pipe_data separated by '|'.
        append it_pipe_data.
      endloop.
      clear it_pipe_data.
      open dataset file1 in text mode for output encoding default.
      if syst-subrc eq 0.
        loop at it_pipe_data.
          transfer it_pipe_data to file1.
        endloop.
        close dataset file1.
      endif.
    ENDFORM.                    " put_data
    *&      Form  validate_data
          text
    -->  p1        text
    <--  p2        text
    FORM validate_data .
      loop at it_input_file.
        read table it_t001 with key bukrs = it_input_file-c_code.
        if syst-subrc <> 0.
          move: it_input_file-c_code  to it_err_log-bukrs,
                it_input_file-seq_num to it_err_log-seq_num,
                c_bukrs_err_desc      to it_err_log-bukrs_err_desc.
        endif.
        read table it_t024 with key ekgrp = it_input_file-purch_grp.
        if syst-subrc <> 0.
          move: it_input_file-purch_grp  to it_err_log-ekgrp,
                it_input_file-seq_num to it_err_log-seq_num,
                c_ekgrp_err_desc         to it_err_log-ekgrp_err_desc.
        endif.
        read table it_t024e with key ekorg = it_input_file-purch_org.
        if syst-subrc <> 0.
          move: it_input_file-purch_org  to it_err_log-ekorg,
                it_input_file-seq_num to it_err_log-seq_num,
                c_ekorg_err_desc         to it_err_log-ekorg_err_desc.
        endif.
        read table it_lfa1 with key lifnr = it_input_file-vend_no.
        if syst-subrc <> 0.
          move: it_input_file-vend_no    to it_err_log-lifnr,
                it_input_file-seq_num to it_err_log-seq_num,
                c_lifnr_err_desc         to it_err_log-lifnr_err_desc.
        endif.
        read table it_mara with key matnr = it_input_file-material.
        if syst-subrc <> 0.
          move: it_input_file-material   to it_err_log-matnr,
                it_input_file-seq_num to it_err_log-seq_num,
                c_matnr_err_desc         to it_err_log-matnr_err_desc.
        endif.
        read table it_marc with key werks = it_input_file-plant.
        if syst-subrc <> 0.
          move: it_input_file-plant      to it_err_log-werks,
                it_input_file-seq_num to it_err_log-seq_num,
                c_werks_err_desc         to it_err_log-werks_err_desc.
        endif.
        read table it_mard with key lgort = it_input_file-Strg_loc.
        if syst-subrc <> 0.
          move: it_input_file-strg_loc   to it_err_log-lgort,
                it_input_file-seq_num to it_err_log-seq_num,
                c_lgort_err_desc         to it_err_log-lgort_err_desc.
        endif.
      endloop.
    ENDFORM.                    " validate_data
    *&      Form  open_unix_dataset
          text
    -->  p1        text
    <--  p2        text
    FORM open_unix_dataset .
      open dataset ld_file for input in text mode encoding default.
      do.
        read dataset ld_file into it_read_file.
        if sy-subrc NE 0.
          exit.
        endif.
        append it_read_file.
        clear it_read_file.
      enddo.
      close dataset ld_file.
      if NOT it_read_file[] is initial.
        loop at it_read_file.
          split it_read_file at '|' into it_file-item_no
                                          it_file-ref_no
                                          it_file-vend_no
                                          it_file-material
                                          it_file-quantity
                                          it_file-price
                                          it_file-ord_unit
                                          it_file-plant
                                          it_file-strg_loc
                                          it_file-purch_org
                                          it_file-purch_grp
                                          it_file-c_code
                                          it_file-doc_typ.
          append it_file.
          clear it_file.
        endloop.
      endif.
    ENDFORM.                    " open_unix_dataset
    *&      Form  open_files
          text
    -->  p1        text
    <--  p2        text
    FORM open_files .
      v_semfile = p_ifname.
      CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
          filename                = v_semfile
          filetype                = 'DAT'
        TABLES
          data_tab                = it_input_file
        EXCEPTIONS
          conversion_error        = 1
          file_open_error         = 2
          file_read_error         = 3
          invalid_table_width     = 4
          invalid_type            = 5
          no_batch                = 6
          unknown_error           = 7
          gui_refuse_filetransfer = 8
          OTHERS                  = 9.
    ENDFORM.                    " open_files
    *&      Form  build_table
          text
    -->  p1        text
    <--  p2        text
    FORM build_table .
      select bukrs into table it_t001
        from t001
        for all entries in it_input_file
        where bukrs = it_input_file-c_code.
      select ekgrp into table it_t024
       from t024
       for all entries in it_input_file
       where ekgrp = it_input_file-purch_grp.
      select ekorg into table it_t024e
        from t024e
        for all entries in it_input_file
        where ekorg = it_input_file-purch_org.
      select lifnr into table it_lfa1
         from lfa1
         for all entries in it_input_file
         where lifnr = it_input_file-vend_no.
      select matnr into table it_mara
         from mara
         for all entries in it_input_file
         where matnr = it_input_file-material.
      select werks into table it_marc
         from marc
         for all entries in it_input_file
         where werks = it_input_file-plant.
      select lgort into table it_mard
         from mard
         for all entries in it_input_file
         where lgort = it_input_file-Strg_loc.
    ENDFORM.                    " build_table
    *&      Form  disp_error_report
          text
    -->  p1        text
    <--  p2        text
    FORM disp_error_report .
      if NOT it_err_log[] is initial.
        move: '0'                     to it_err_log-seq_num,
              'Vendor'                to it_err_log-lifnr,
              'Vendor Error'          to it_err_log-lifnr_err_desc,
              'Company Code'          to it_err_log-bukrs,
              'Company Code Error'    to it_err_log-bukrs_err_desc,
              'Purchase Org'          to it_err_log-ekorg,
              'Purchase Org Error'    to it_err_log-ekorg_err_desc,
              'Purchase Group'        to it_err_log-ekgrp,
              'Purchase Group Error'  to it_err_log-ekgrp_err_desc,
              'Plant'                 to it_err_log-werks,
              'Plant Error'           to it_err_log-werks_err_desc,
              'Storage Loc'           to it_err_log-lgort,
              'Storage Loc Error'     to it_err_log-lgort_err_desc,
              'Material'              to it_err_log-matnr,
              'Material Error'        to it_err_log-matnr_err_desc.
        append it_err_log.
        sort it_err_log by seq_num.
        loop at it_err_log where seq_num eq '0'.
          move 'Seq Num' to it_err_log-seq_num.
          modify it_err_log.
        endloop.
        concatenate 'c:\inventory_error_log' syst-datum syst-uzeit '.xls'
          into v_fullpath.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
      BIN_FILESIZE                    =
            FILENAME                        =  v_fullpath
            FILETYPE                        = 'DAT'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
         IMPORTING
           FILELENGTH                      = v_length
          TABLES
            DATA_TAB                        = it_err_log
      FIELDNAMES                      =
         EXCEPTIONS
           FILE_WRITE_ERROR                = 1
           NO_BATCH                        = 2
           GUI_REFUSE_FILETRANSFER         = 3
           INVALID_TYPE                    = 4
           NO_AUTHORITY                    = 5
           UNKNOWN_ERROR                   = 6
           HEADER_NOT_ALLOWED              = 7
           SEPARATOR_NOT_ALLOWED           = 8
           FILESIZE_NOT_ALLOWED            = 9
           HEADER_TOO_LONG                 = 10
           DP_ERROR_CREATE                 = 11
           DP_ERROR_SEND                   = 12
           DP_ERROR_WRITE                  = 13
           UNKNOWN_DP_ERROR                = 14
           ACCESS_DENIED                   = 15
           DP_OUT_OF_MEMORY                = 16
           DISK_FULL                       = 17
           DP_TIMEOUT                      = 18
           FILE_NOT_FOUND                  = 19
           DATAPROVIDER_EXCEPTION          = 20
           CONTROL_FLUSH_ERROR             = 21
           OTHERS                          = 22
        IF SY-SUBRC <> 0.
          write:/30 'Error in generating purchase order error log'.
          write:/30 syst-uline(44).
        else.
          write:/30 'Purchase Order error log'.
          write:/30 syst-uline(24).
          skip 2.
          write:/10 'Please check the error loag file at:', v_fullpath.
        ENDIF.
      else.
        write:/30 'Purchase Order data l log'.
        write:/30 syst-uline(24).
        skip 2.
        write:/10 'There is no error in the input file data, so please proceed to execute the load!!'.
      endif.
    ENDFORM.                    " disp_error_report
    and my input file looks like this:
    1 1000 NB 20071210 V1 AE01 501 USD 10 M5 1003 100 1000 EA 20071110
    1 1000 NB 20071210 V1 AE01 507 USD 10 P10 1003 100 2000 EA 20071110
    2 1000 NB 20071210 V1 AE01 501 USD 10 M5 1003 50 1000 EA 20071110
    the name of the fields in order are : refno., compnaycode,doc-typ,doc_date,vendor,purch_org,purch_grp,currency
    tem no, material, plant, quantity, price, order unit, del_date.
    The ref No. field in the text file acts as a unique identifier So basically my Program should create 2 PO's but to my surprise it created 5 or 6 po's with only first record.
    Can you please help me out....
    Thanks
    Rajeev Gupta
    Message was edited by:
            Rajeev Gupta
    Title and Message were edited by:
            Alvaro Tejada Galindo

    and have you set a breakpoint at loop at input file and at bapi_po_create ??
    perhaps there is something wrong with the amount of items passed ?
    kind regards
    arthur

  • How to implement a time watch for an object

    Greetings!
    I have a container called TupleSpace which consists of elements of type Tuple. Among the attributes, the Tuple also has a "time to live" (the maximum amount of time its presence is allowed on the TupleSpace). After this amount of time passes it should be automatically deleted from the TupleSpace. My question is: what is the best mechanism to implement this ?
    My solution so far looks like this:
    public void removeExpiredTuple(){
    // ts = instance of TupleSpace class
              for (int i = 0; i < ts.size(); i++){
                   ITuple currentTuple = (ITuple) ts.elementAt(i);
                   long tupleAge = System.currentTimeMillis() - currentTuple.getTimeSubmitted();
    // currentTuple.getTtl() = retrieves the Tuple's "time to live"
                   if (tupleAge > currentTuple.getTtl())
                        ts.remove(i);
         }but I am not at all satisfied with it
    Thanks in advance for your answers
    Edited by: OctavianS on Jan 18, 2008 12:10 PM

    ok, I'll give it a try and come back with a reply
    LE: problem solved. thx again
    Edited by: OctavianS on Jan 22, 2008 3:56 PM

  • Unable to enter Input value for an ICD

    Hi All,
    I have created an element XXX which has two input values "Pay Value" and "Class". The class has the values 'A','B','C','D'. I have created a plan and set up the rate In the calculation method I have chosen "No Standard values used".
    Now when I try to assign this ICD plan to the user in the Miscellaneous plan I am not able to enter the car class. Can someone help me with this.
    Thanks
    Shekar.

    Hi Shekar
    I find the ICD setup very 'picky'! If you get one thing wrong, it doesn't work. I have detailed below the steps I usually advise people to tek. Check your setup and see if this helps.
    1. Define Plan Type, Compensation Category = Others.
    2. Define Plan. Link to Plan Type. Plan Usage = May not be in program. On Not in program Tab - define sequence, currency, enrollment rate (per pay period?), activity reference period (Monthly). Your settings may need to be different. On Plan details tab, enter plan years.
    3. Plan enrollment requirements. On the general tab, plan sub tab, make sure the method = EXPLICIT. this allows the user to enter an input value for the ICD. THIS MAY WELL BE THE SOURCE OF YOUR PROBLEM!
    Make sure the CERTIFICATION region is UNTICKED. This can also cause ICDs not to work.
    ALLOWS UNRESTRICTED ENROLLMENT must be TICKED. Otherwise there is no eligibility to the ICD.
    On the rates subregion, make sure the run strt date is set to ENTERABLE.
    4. standard Rates form. Make sure the ACTIVITY TYPE and TAX TYPE are entered. Select the ELEMENT and the INPUT VALUE and TICK the ELEMENT AND INPUT VALUE REQUIRED field.
    On the processing Information tab - TICK ASSIGN ON ENROLMENT, DISPLAY ON ENROLLMENT and PROCESS EACH PAY PERIOD. Enter PER PAY PERIOD AMOUNT in VALUE PASSED TO PAYROLL and OTHER in COMPENSATION CATEGORY.
    Let me know if this works!
    Regards
    Tim

Maybe you are looking for

  • Looking for app to use for reminder of customers service days

    I am a Chimney Sweep and I'm looking for an app i can have on my iPad & iMac that i can set reminders for customers service days, they could be a year ahead but its reminder for me to then tell the customer its time to have your chimney cleaned. Than

  • How to apply OSS note and how to use it?--thanks

    Hi, morning all, I want to know how to apply OSS notes and how to use it, pls help me. Thanks.

  • HT1379 The dvd disc is not readable in my dvd superdrive

    My macbook pro retina display is less than a year old as well as the external dvd superdrive.  The dvd player has worked in the past.  Now, when I plug it in to the USB port and put a dvd in the slot, approimately 10 seconds later, the computer repor

  • How can I link EntityClass properties to GUI compoments?

    Contact.java package pub.lne.entidades; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; impo

  • Save for web gif issue

    Hi everybody hopefully someone here will be able to help. so here's the problem : Started since photoshop cs4 11.0.2 update, before everything was doing just fine, and I use photoshop everyday. Now, when I try to save for web I just got png or jpegs