Currency default

The currency default on my Q10 wont change to £ and remains as $ even though i have changed my regional settings to UK, does anyone else have this problem or is my handset just faulty. i know it may sound trivial but it is really annoying having to go into symbols to select £ whilst typing

Did you read somewhere that the currency default symbol would change with your language settings?
I had been told it would, but I couldn't get it work on my Q10 either.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4   Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA   Display/Scan Bar Code

Similar Messages

  • How to default condition record currency when creating in VK11

    Hello experts,
      I have created a pricing table with fields that are not sales org specific. I have subsequently created a condition type that uses an access sequence that uses this table. The condition type is set up as a cond class B(price) with a calculation type B(fixed amount). All works great, however, when creating the condition record it is requiring an entry for currency. Is there a way I can have currency default in when creating the condition record?

    Hi,
    NO U cannot have it since Currency in sales is in Sales Org which is missing in yr config.
    U need to enter it manually.
    Regards
    Krishna

  • Defaulting of Currency in opportunities

    Hello,
    in an opportunity we copied an ORGMAN rule to an own one and changed the function module in the rule definition to "CRM_ORGMAN_ORGOBJECTS_FIND_11".
    Before we did this, the opportunity had no currency defaulted and determined the currency of the BPs sales area data.
    After using the new rule, the opportunity has the currency "EUR" defaulted and doesn't change in case the BPs sales area data has another currency maintained.
    Is somebody having a clue why this is the case and how to change it.
    Thanks in advance!
    Best regards
    Thorsten

    In table T526, give all administrators the same ID (but different groups).
    Example:
    Admin Group 0001: PA1 PA administrator, PT1 Time administrator, PY1 Payroll administrator
    Admin Group 0002: PA1 PA administrator, PT1 Time administrator, PY1 Payroll administrator
    Write a dynamic action to fill the values PA1, PT1 and PY1 into the SACH* fields on creation of hiring action.
    This way, the group will be defaulted by PINCH and your administrators will be defaulted by the dynamic action.

  • Default Value - Transaction currency

    Dear All,
    In my breakdown categories, i have transaction currency as one of the characterisitic.
    The breakdown type specified for it is - Req Breakdown: if blank default value is used.
    I understand from my testing - that the system populates the local currency of a consolidation unit as the transaction curr - when a missing entry is found.
    Want to know -
    How the system derives this default value for transaction currency?
    Thanks!

    I m sorry for the ambiguity in my question.
    Let us say,
    I have specified breakdown category A for financial item 12000.
    In the breakdown category A - i have specified breakdown by transaction currency.
    For this breakdown i have specified breakdown type as - required breakdown:if blank, the default value is used
    When i do a flat file upload (12000 item has no transaction curr specified), the system gives the message as
    Breakdown Item 12000 by Transaction Currency: Default value inserted
    Message no. UCD1028
    Diagnosis
    The current record has no value for characteristic Transaction Currency.
    System Response
    The characteristic Transaction Currency will be filled with default value  because Item 12000 has no breakdown by Transaction Currency, does not post in Transaction Currency, or because the value of Transaction Currency is initialized.
    Want to know, how this default value is filled.
    (Does it fill as transaction curr - the local currency of the consolidation unit - for which the upload was done?)
    Thanks!
    Edited by: Kumar on May 20, 2009 8:51 PM

  • How to populate data in TargetCube from SourceCube for a particular product/currency dimension selected in form1.

    Hi,
    Need help regarding Business rule scenario "How to populate data in "Target Form (plantype2)" from "Source Form(plantype1)" for a particular product/currency dimension combination selected in form1"
    Scenario 1) :  I have data for Product(Computer)/Currency(USD) dimension combination in Source Form
                        When i open Target Form and then select a Product(Computer)/Currency(USD) combination and then right click on form to invoke a Business rule to get data for this same                     product/currency combination from Source Form.
    Scenario 2) : If there isnt any data in Source Form for product(Computer)/Currency(USD) combination, then the data for product(computer)/Currency(Default Currency) to be populated into Target                     Form.
    The members in Currency Dimension (Shared Dimension) are USD & Default Currency.
    Can anyone please help.
    Thanks,
    Rajkumar

    Adding to what Celvin Kattookaran has said
    You can either write a Business Rule / Calculation script with @XREF function and also you can check condition if there is data in USD then populate USD else "Default currency"
    If you want that data in source to be available in target, then you can use @XWRITE in a rule from source cube to push the data to Target.
    Amarnath
    ORACLE | Essbase

  • How to set default curreny in IT15

    hi dear experts,
    I have set currency in V_T510F_B  and V_T001, but still no default currency in IT15, could you please kindly help where to set this currency default?
    Thanks very much. Xiaoli

    Hi,
    Except putting a breakpoint on line
    perform re500c(sapfp50m) using psyst-land p0015-begda
      (around line 68) in include MP001520 and observe what happens at runtime, I'm left without solution...
    Check if PSYST-LAND is correctly filled at runtime in debug.
    Best regards,
    Guillaume

  • Multiple currency planning and budgeting?

    Hi all
    We are having a requirement of planning and budgeting in same WBS with multiple currencies and also seeing reports in different currencies on single screen.
    Now has anybody explored this area and has anything to suggest.
    Thanks in anticipation
    Raman

    Hi Raman
    The following is the literature from SAP on the subject. You may find it useful.
    Planning and Budgeting in Any Currency
    Use
    International groups often use one uniform company code currency (group currency) in CO. However, it may be necessary to plan and budget in the respective local currency as the majority of costs will be incurred in the local currency. The local currency is usually the corresponding company code currency.
    Previously only budgeting of jobs (orders and projects) was possible in the local currency.
    From Release 4.70, you can also budget investement programs in the local currency. In addition, it is possible to plan investment programs, appropriation requests and jobs directly in the local currency.
    As was previously the case for orders and projects, plan and budget values for investment programs and appropriation requests are also saved in both the controlling area and local currencies defined in the master record of each object. If you change or re-specify the exchanged rates used, it is now possible to recalculate the values in the local currency using the values in the controlling area currency, and vice-versa.
    In reporting for IM, it is even possible to calculate evaluations in any report currency (plan, budget and assigned values). If the values are available in the specified report currency, they are issued unchanged. If they are not available, they are converted from the controlling area currency into the report currency.
    Effects on Existing Data
    Before Release 4.70, the plan values for appropriation requirements, were only saved in the controlling area currency. This was also the case if a local object currency was specified in the master record for the appropriation requirement. From Release 4.70, the plan values for appropriation requirements are always saved in the controlling area and local currencies. Therefore, you must adjust appropriation requests that were created in an earlier release and use a local currency that varies from the local object currency. The easiest way to do this is to use the program RAIMCRC2 to recalculate the plan values in the local object currency for appropriation requests whose plan values are in the controlling area currency (transaction IMCRC2, menu path: Financial Accounting  -> Investment Management -> Appropriation Requests -> Tools -> Recalculate Currency Plan for Appropriation Requests). Before you run the program, select the relevant option in the Process Control section of the initial screen.
    Effects on Customizing
    Adjustment of Planning and Budget Profiles
    To enable the planning of investment programs, appropriation requests and jobs in a transaction currency different to the controlling area currency, you must adjust the relevant planning profiles.
    To enable the budgeting of investment programs in a transaction currency different to the controlling area currency, you must adjust the relevant budget profiles.
    In the planning currency (or budgeting currency) section of the planning (or budget) profile, you must define the transaction currency in which planning (or budgeting) is to be executed:
    Only in the controlling area currency (default),
    Only in the object currency
    (= local currency defined in object master record ) or
    In a transaction currency chosen at the start of planning/budgeting
    (this option is not possible for appropriation requests).
    In the planning or budget profiles, you must also define the exchange rate types to be used for the conversion of total values that are not dependent on the fiscal year.
    To adjust the planning profiles, use the process steps:
    Maintain Planning Profiles  (investment programs)
    Maintain Planning Profile for Cost Planning (appropiation requests)
    To adjust the budgeting profiles, use the process steps:
    Define Budget Profiles for Investment Programs   (investment programs)
    Exchange Rate Types
    In the fiscal-year-dependent data of the CO planning versions, you must also define the exchange rate types to be used for conversion of plan values that are not dependent on the fiscal year.
    For conversion of fiscal-year-dependent budget values and fiscal-year-dependent plan values of appropriation request variants not yet assigned to a plan version, each exchange rate type is taken from the fiscal-year-dependent data of the CO planning versions 0.
    As the plan or budget values are stored in the transaction, controlling area, and local currencies, the exchange rates used must enable the conversion of the transaction currency into the controlling area and local currencies. Where necessary, the exchange rates used must be extended.
    To enter the exchange rate types, use the process step:
    Define Versions  (investment programs)
    Change Planning or Budget Currency
    If you always planned or budgeted existing investment programs/measures in the controlling area currency, it is not subsequently possible to change the planning or budget currency to the object currency in the planning or budget profiles. This conversion is not prevented in Customizing, but leads to an error when you next plan or budget existing investment programs/measures. Alternatively, you can convert the planning or budget currency into the transaction currency in the planning or budget profiles, and set the object currency indicator as default.
    A similar restriction does not exist for appropriation requests. You can change the planning currency in the planning profile at any time.
    Use the process step under "Adjust the Planning and Budgeting Profiles".
    Detailed Planning
    When you call up detailed planning from structure-based cost planning or revenue planning, the standard SAP planning profiles are used, to which the standard SAP planning layouts are assigned. These planning profiles cannot be changed in the planning transactions. Import the standard SAP planning layouts 1-401-IM, 1-402-IM, 1-403-IM, 1-701-IM,  1-702-IM and 1-703-IM using the transaction OKBF from client 000 in your client.
    To execute the import, choose the process step:
    Import Standard Planning Layouts.
    Reporting Currency for IM Reporting
    In IM reporting, if you want to be able to specify a reporting currency that is different to the controlling area and object currencies used in the investment program items or subordinate appropriation requests and measures, another exchange rate type is required for the due conversion of plan, budget, or values into the reporting currency. You define this exchange rate type in Customizing for the program type for the investment program to be reported ( Group Reporting).
    To enter additional reporting currencies, use the process step:
    Define Program Types  (investment programs)
    you may also refer the following link in SAP help on the subject
    [http://help.sap.com/saphelp_47x200/helpdata/en/86/98853478616434e10000009b38f83b/frameset.htm]
    Venu

  • Currency in purchase requisition

    Hi Gurus,
    The user is trying to create a PR with services. By default the currency is taking PKR (pakistan) currrency. But the user wants it to be USD for that requisition.
    I think it wont possible, but i want to know the info indetail.  Can anyone explain me about this.
    Regards
    subbu

    What is your Plant Currency??
    System will the Currency in Purchase Requisition as per the Plant Currency....
    Go to ME51N and Click on Personal Settings and Check Currency is Set as Default. If Set, Remove and Save.
    Note : Even if you Set the currency Default it will Overwrite the Plant Currency. That is As soon as you enter Plant it will Overwrite.
    Edited by: Ashøk Kümàr Telikülà on Jan 23, 2009 2:34 PM

  • Currency field on the PO line

    Gurus,
    the currency field on the PO is defaulting to the Vendor ordering currency and is completely fgreyed out not allowing a change. Is there a config that can change this field to be editable??
    Thanks in advance,
    MV

    Hi,
    Its easy to change Currency default in item details.
    go to header --> delivery/invoice tab then you see here currency enter wich currency you want this will automatically change item details .
    Hope this helps you
    Prem.

  • PR currency

    Hi all,
    I have 2 questions regarding PR currency. Can someone help on this?
    1) Where does the PR currency default from?
    2) When i create a PO with reference to the PR, the PR currency does not copy over to the PO. Why is it so?
    Thanks.
    Regards,
    zhulk

    Hi
    1) Where does the PR currency default from?
    PR currency is defaulted from company code ( plant is assigned to company code )
    2) When i create a PO with reference to the PR, the PR currency does not copy over to the PO. Why is it so?
    At the time of PO creation currency is picked from Vendor master/Info record and not from PR
    Vishal...

  • Bapi for creating purchase order

    hi, iam using BAPI_PO_CREATE1 to create PO's for service. after creating opne PO if i go and create another po within a short span of a minute or so then it does not create the second PO. it gives message that doc does not contain any items.
    TABLES: ekpo,zcta_podates,ekko.
    DATA iekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
    DATA iekko LIKE ekko OCCURS 0 WITH HEADER LINE.
    DATA ipodates LIKE zcta_podates OCCURS 0 WITH HEADER LINE.
    DATA : wabldat1 LIKE zcta_podates-podat.
    DATA : wabldat2 LIKE zcta_podates-podat.
    DATA : wabldat3 LIKE zcta_podates-podat.
    DATA : wabldat4 LIKE zcta_podates-podat.
    DATA : wabldat5 LIKE zcta_podates-podat.
    DATA : wabldat6 LIKE zcta_podates-podat.
    DATA : wabldat7 LIKE zcta_podates-podat.
    DATA :fname1 TYPE string.
    DATA :w_fname1 TYPE string.
    DATA : BEGIN OF itab1 OCCURS 0 ,
           txz01 LIKE mepo1211-txz01,
           werks LIKE mepo1211-name1,
           srvpos  LIKE esll-srvpos,
           gross(15),
           val1(10),   "LIKE esll-frmval1,
           val2(10),   " LIKE esll-frmval2
           val3(10),
          zzformat LIKE ekpo-zzformat,
          zzcampaign LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity  LIKE ekpo-zzcity,
          zzlangu  LIKE ekpo-zzlangu,
          zzedition LIKE ekpo-zzedition,
          zzcolorhue  LIKE ekpo-zzcolorhue,
          zztypeofad LIKE ekpo-zztypeofad,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
           END OF itab1.
    DATA :BEGIN OF itab2 OCCURS 0,         " radio
             txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          zzformat LIKE ekpo-zzformat,
          zzcampaign  LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity      LIKE ekpo-zzcity,
          zzprogramname LIKE ekpo-zzprogramname,
          zzdealstructure LIKE ekpo-zzdealstructure,
          zztimeband    LIKE ekpo-zztimeband,
         date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab2.
    DATA :BEGIN OF itab3 OCCURS 0,   "tv
          txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzgenre        LIKE ekpo-zzgenre,
          zzprogramname LIKE ekpo-zzprogramname,
          zzdealstructure LIKE ekpo-zzdealstructure,
          zztimeband    LIKE ekpo-zztimeband,
          zzlangu       LIKE ekpo-zzlangu,
          zzcity(20),  "      LIKE ekpo-zzcity,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab3.
    DATA :BEGIN OF itab4 OCCURS 0,   "OUTDOOR
             txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          cond(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity      LIKE ekpo-zzcity,
          zzlocationorroad LIKE ekpo-zzlocationorroad,
          zztypeofad  LIKE ekpo-zztypeofad,
          zztrafficdirtn LIKE ekpo-zztrafficdirtn,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab4.
    DATA :BEGIN OF itab5 OCCURS 0,  "INTERNET
          txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          cond(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zztypeofad  LIKE ekpo-zztypeofad,
          zzsection      LIKE ekpo-zzsection,
         date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab5.
    DATA :BEGIN OF itab6 OCCURS 0,  "CINEMA
          txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          cond(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzcity      LIKE ekpo-zzcity,
          zzlocationorroad LIKE ekpo-zzlocationorroad,
          zzcinemaname   LIKE ekpo-zzcinemaname,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab6.
    DATA :BEGIN OF itab7 OCCURS 0,   "OTHER MEDIA
             txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          val3(10),
          val4(10),
          zzformat LIKE ekpo-zzformat,
          zcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity      LIKE ekpo-zzcity,
          zzedition   LIKE ekpo-zzedition,
          zzcolorhue  LIKE ekpo-zzcolorhue,
          zztypeofad  LIKE ekpo-zztypeofad,
          zzlangu       LIKE ekpo-zzlangu,
          zzgenre        LIKE ekpo-zzgenre,
          zzprogramname LIKE ekpo-zzprogramname,
          zzdealstructure LIKE ekpo-zzdealstructure,
          zztimeband    LIKE ekpo-zztimeband,
          zzlocationorroad LIKE ekpo-zzlocationorroad,
          zzsection      LIKE ekpo-zzsection,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab7.
    DATA :BEGIN OF itab8 OCCURS 0,    "NO MEDIA
            txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          qty(12),
          gross(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzcity      LIKE ekpo-zzcity,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab8.
    DATA : BEGIN OF str OCCURS 0,
           txz01 LIKE mepo1211-txz01,
           werks LIKE mepo1211-name1,
           srvpos  LIKE esll-srvpos,
           gross(15),
           val1(10),   "LIKE esll-frmval1,
           val2(10),   " LIKE esll-frmval2
           val3(10),
          val4(10),
          zzformat LIKE ekpo-zzformat,
          zzcampaign LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity  LIKE ekpo-zzcity,
          zzlangu  LIKE ekpo-zzlangu,
          zzedition LIKE ekpo-zzedition,
          zzcolorhue  LIKE ekpo-zzcolorhue,
          zztypeofad LIKE ekpo-zztypeofad,
          zzillumination LIKE ekpo-zzillumination ,
         zztrafficdirtn LIKE ekpo-zztrafficdirtn ,
        zzstore LIKE ekpo-zzstore ,
        zzcasting LIKE ekpo-zzcasting ,
        zzgenre LIKE ekpo-zzgenre ,
        zzsection LIKE ekpo-zzsection ,
        zznumberofdays LIKE ekpo-zznumberofdays ,
        zzprogramname LIKE ekpo-zzprogramname ,
        zzdealstructure LIKE ekpo-zzdealstructure ,
        zztimeband LIKE ekpo-zztimeband ,
        zzdate LIKE ekpo-zzdate ,
    zzdaysofwk LIKE ekpo-zzdaysofwk ,
    zzasnum LIKE ekpo-zzasnum ,
    zzlocationorroad LIKE ekpo-zzlocationorroad ,
    zzcinemaname LIKE ekpo-zzcinemaname ,
    zzcapacity LIKE ekpo-zzcapacity ,
    zzfield2 LIKE ekpo-zzfield2 ,
    zzfield3 LIKE ekpo-zzfield3 ,
           date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
           END OF str.
    DATA :package(10) TYPE n VALUE '4747'.
    DATA :subpackage(10) TYPE n VALUE '4748'.
    DATA : l_po_header LIKE bapimepoheader.
    DATA : l_po_headerx LIKE bapimepoheaderx.
    DATA : l_purchaseorder LIKE bapimepoheader-po_number.
    DATA : t_po_account LIKE bapimepoaccount OCCURS 0 WITH HEADER LINE.
    DATA : t_po_accountx LIKE bapimepoaccountx OCCURS 0 WITH HEADER LINE.
    DATA : t_po_servalue LIKE bapiesklc OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF t_po_items OCCURS 0.
            INCLUDE STRUCTURE bapimepoitem.
    DATA : END OF t_po_items.
    DATA : BEGIN OF t_po_itemsx OCCURS 0.
            INCLUDE STRUCTURE bapimepoitemx.
    DATA : END OF t_po_itemsx.
    DATA : BEGIN OF t_return OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA : END OF t_return.
    DATA : BEGIN OF t_po_services OCCURS 0.
            INCLUDE STRUCTURE bapiesllc.
    DATA : END OF t_po_services.
    DATA: l_item(5) TYPE n,l_last_po(10).
    *TABLES : zerror.
    DATA lcounter(3) TYPE n.
    DATA : l_errflag.
    SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETER:x_lifnr LIKE ekko-lifnr .
    PARAMETER:x_ekorg LIKE ekko-ekorg DEFAULT '9000' .
    PARAMETER:x_ekgrp LIKE ekko-ekgrp .
    PARAMETER:x_bukrs LIKE ekko-bukrs DEFAULT '0101' .
    PARAMETER:x_bsart LIKE ekko-bsart DEFAULT 'ZNB1'.
    PARAMETER:x_sdate LIKE ekko-bedat.
    PARAMETER : x_edate LIKE ekko-bedat.
    PARAMETER: pr_fn1 LIKE ibipparms-path OBLIGATORY.
    PARAMETER: rad1 RADIOBUTTON GROUP gr1.
    PARAMETER: rad2 RADIOBUTTON GROUP gr1.
    PARAMETER: rad3 RADIOBUTTON GROUP gr1.
    PARAMETER: rad4 RADIOBUTTON GROUP gr1.
    PARAMETER: rad5 RADIOBUTTON GROUP gr1.
    PARAMETER: rad6 RADIOBUTTON GROUP gr1.
    PARAMETER: rad7 RADIOBUTTON GROUP gr1.
    PARAMETER: rad8 RADIOBUTTON GROUP gr1.
    SELECTION-SCREEN:END OF BLOCK b1 .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_fn1.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = pr_fn1.
      MOVE pr_fn1 TO w_fname1.
    START-OF-SELECTION.
      IF rad1 = 'X'.
        PERFORM table_upload  TABLES itab1.
      ELSEIF rad2 = 'X'.
        PERFORM table_upload  TABLES itab2.
      ELSEIF rad3 = 'X'.
        PERFORM table_upload  TABLES itab3.
      ELSEIF rad4 = 'X'.
        PERFORM table_upload  TABLES itab4.
      ELSEIF rad5 = 'X'.
        PERFORM table_upload  TABLES itab5.
      ELSEIF rad6 = 'X'.
        PERFORM table_upload  TABLES itab6.
      ELSEIF rad7 = 'X'.
        PERFORM table_upload  TABLES itab7.
      ELSEIF rad8 = 'X'.
        PERFORM table_upload  TABLES itab8.
      ENDIF.
      LOOP AT str.
        SHIFT str-srvpos RIGHT DELETING TRAILING ' '.
        OVERLAY str-srvpos WITH '00000000000000000'.
        MODIFY str.
      ENDLOOP.
      CLEAR : l_po_header.
      PERFORM create_po_header.
      LOOP AT str FROM 2 .
        PERFORM append_item.
      ENDLOOP.
      PERFORM create_po.
      WAIT UP TO 5 SECONDS.
      SELECT * FROM ekpo INTO CORRESPONDING FIELDS OF TABLE iekpo WHERE ebeln = l_purchaseorder.
      COMMIT WORK.
      WAIT UP TO  5 SECONDS.
      LOOP AT iekpo.
        l_item =  sy-tabix + 1.
        READ TABLE str INDEX  l_item.
        iekpo-zzfield2 = str-zzfield2 .
        iekpo-zzfield3 = str-zzfield3 .
        iekpo-zzformat = str-zzformat .
        iekpo-zzmeansofad = str-zzmeansofad .
        iekpo-zzedition = str-zzedition .
        iekpo-zzcolorhue = str-zzcolorhue .
        iekpo-zztypeofad = str-zztypeofad .
        iekpo-zzcity = str-zzcity .
        iekpo-zzlangu = str-zzlangu .
        iekpo-zzdaysofwk = str-zzdaysofwk .
        iekpo-zzasnum = str-zzasnum .
        iekpo-zzlocationorroad = str-zzlocationorroad .
        iekpo-zzcinemaname = str-zzcinemaname .
        iekpo-zzcapacity = str-zzcapacity .
        iekpo-zzcampaign = str-zzcampaign .
        iekpo-zzillumination = str-zzillumination .
        iekpo-zztrafficdirtn = str-zztrafficdirtn .
        iekpo-zzstore = str-zzstore .
        iekpo-zzcasting = str-zzcasting .
        iekpo-zzgenre = str-zzgenre .
        iekpo-zzsection = str-zzsection .
        iekpo-zznumberofdays = str-zznumberofdays .
        iekpo-zzprogramname = str-zzprogramname .
        iekpo-zzdealstructure = str-zzdealstructure .
        iekpo-zztimeband = str-zztimeband .
        iekpo-zzdate = str-zzdate .
        MODIFY iekpo.
      ENDLOOP.
      WAIT UP TO 2 SECONDS.
      COMMIT WORK.
      WAIT UP TO 15 SECONDS.
      UPDATE ekpo FROM TABLE iekpo.
      COMMIT WORK.
      WAIT UP TO 2 SECONDS.
      SELECT * FROM ekko INTO CORRESPONDING FIELDS OF TABLE iekko WHERE ebeln = l_purchaseorder.
      LOOP AT iekko.
        iekko-kdatb = x_sdate.
        iekko-kdate = x_edate.
        MODIFY iekko.
      ENDLOOP.
      UPDATE ekko FROM TABLE iekko.
      COMMIT WORK.
      WAIT UP TO 1 SECONDS.
      CLEAR l_item.
      l_item = 10.
      LOOP AT str FROM 2 .
        CONCATENATE str-date1+6(4)  str-date1+3(2)  str-date1(2)  INTO wabldat1.
        CONCATENATE str-date2+6(4)  str-date2+3(2)  str-date2(2)  INTO wabldat2.
        CONCATENATE str-date3+6(4)  str-date3+3(2)  str-date3(2)  INTO wabldat3.
        CONCATENATE str-date4+6(4)  str-date4+3(2)  str-date4(2)  INTO wabldat4.
        CONCATENATE str-date5+6(4)  str-date5+3(2)  str-date5(2)  INTO wabldat5.
        CONCATENATE str-date6+6(4)  str-date6+3(2)  str-date6(2)  INTO wabldat6.
        CONCATENATE str-date7+6(4)  str-date7+3(2)  str-date7(2)  INTO wabldat7.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '001'.
        ipodates-podat = wabldat1.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '002'.
        ipodates-podat = wabldat2.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '003'.
        ipodates-podat = wabldat3.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '004'.
        ipodates-podat = wabldat4.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '005'.
        ipodates-podat = wabldat5.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '006'.
        ipodates-podat = wabldat6.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '007'.
        ipodates-podat = wabldat7.
        APPEND ipodates.
        l_item = l_item + 10.
      ENDLOOP.
      WAIT UP TO 1 SECONDS.
      MODIFY zcta_podates FROM TABLE ipodates.
      COMMIT WORK.
      WAIT UP TO 2 SECONDS.
    ipodates-podat,ipodates-ebeln,ipodates-ebelp,ipodates-linno.
      WAIT UP TO 5 SECONDS.
      LOOP AT t_return.
        WRITE :/ t_return-message.
      ENDLOOP.
    free : ipodates,iekpo,str,itab1,itab2,itab3,itab4,itab5,itab6,itab7,itab8.
    *&      Form  create_po_header
    FORM create_po_header .
      l_po_header-comp_code = '0101'.             " Company Code
      l_po_header-doc_type = x_bsart.         "'ZNB1'.            " Order Typr BSART
      l_po_header-creat_date = sy-datum.        " P.O Dt - BEDAT
      l_po_header-doc_date  = sy-datum.
      l_po_header-vendor   =   x_lifnr.
      l_po_header-vper_start  = x_sdate.
      l_po_header-vper_end  =     x_edate.
      l_po_header-purch_org = '9000'.           " Purch. Org - EKKO-EKORG
      l_po_header-pur_group = x_ekgrp.        " Purch Group - EKKO-EKGRP
      l_po_header-currency_iso = 'INR'.
      CLEAR : l_po_headerx.
      l_po_headerx-po_number = 'X'.
      l_po_headerx-comp_code = 'X'." Company Code
      l_po_headerx-doc_type = 'X'. " Order Typr BSART
      l_po_headerx-vendor = 'X'. "Vendor - EKKO-LIFNR
      l_po_headerx-purch_org = 'X'. " Purch. Org - EKKO-EKORG
      l_po_headerx-pur_group = 'X'. " Purch Group - EKKO-EKGRP
      l_po_headerx-currency_iso = 'X'. " Currency Default field for Enjoy
      l_po_headerx-ref_1       = 'X'.
    ENDFORM.                    " create_po_header
    *&      Form  APPEND_ITEM
    FORM append_item .
      package  = package + 2.
      subpackage = package + 1.
      l_item = l_item + 10.
      t_po_items-po_item =  l_item.
      t_po_items-acctasscat = 'K'.
      t_po_items-item_cat = 'D'.
      t_po_items-short_text = str-txz01. .
      t_po_items-plant = str-werks  . " P
      t_po_items-tax_code = 'S1'.
      t_po_items-pckg_no  =    package.            " 4748.             "package.
      APPEND t_po_items.
      CLEAR t_po_items.
      t_po_itemsx-po_item =  l_item.
      t_po_itemsx-po_itemx = 'X'.
      t_po_itemsx-acctasscat = 'X'.
      t_po_itemsx-item_cat = 'X'.
      t_po_itemsx-short_text = 'X'.
      t_po_itemsx-plant = 'X'.
      t_po_itemsx-tax_code = 'X'.
      t_po_itemsx-pckg_no  = 'X'.
      APPEND t_po_itemsx.
      CLEAR t_po_itemsx.
      t_po_account-po_item =  l_item.
      t_po_account-serial_no = 1.
      t_po_account-quantity = 1.
      t_po_account-distr_perc = '00'.
      t_po_account-costcenter = '0006079000'.                   " 'BR034'.
      t_po_account-gl_account = '0054014071'.        "'0000135075'.
      t_po_account-co_area    =  '1001'.
      APPEND t_po_account.
      CLEAR t_po_account.
      t_po_accountx-po_item =  l_item.
      t_po_accountx-serial_no = 1.
    t_po_accountx-quantity = 'X'.
      t_po_accountx-distr_perc = 'X'.
      t_po_accountx-costcenter = 'X'.
      t_po_accountx-gl_account = 'X'.
      t_po_accountx-co_area  = 'X'.
      APPEND t_po_accountx.
      CLEAR t_po_accountx.
      t_po_services-pckg_no =  package.                         "'4748'.
      t_po_services-line_no = '0000000001' .
      t_po_services-ext_line = '0000000000' .
      t_po_services-outl_level = '0'.
      t_po_services-outl_no = ' '.
      t_po_services-outl_ind = 'X'.
      t_po_services-subpckg_no =  subpackage .                  "'4749'.
      APPEND t_po_services. CLEAR t_po_services .
      t_po_services-pckg_no = subpackage .                      "'4749'.
      t_po_services-line_no = '0000000002' .
      t_po_services-ext_line = '10' .
      t_po_services-outl_level = '0'.
      t_po_services-service = str-srvpos.          "'000000000003000045'.
      t_po_services-gr_price = str-gross.                       "'2000.00'.
      t_po_services-form_val1 =  str-val1.                      "'10.000'.
      t_po_services-form_val2 = str-val2.                       "'33.000'.
    if rad1 = 'x'.
      t_po_services-form_val3 = str-val3.                       " '3.000'.
    endif.
      t_po_services-tax_code   = 'S1'.
      APPEND t_po_services. CLEAR t_po_services .
      t_po_servalue-pckg_no = subpackage .                      "'4749'.
      t_po_servalue-line_no = '0000000002' .
      t_po_servalue-serial_no = '01'.
      APPEND t_po_servalue . CLEAR t_po_servalue.
    ENDFORM.                    " APPEND_ITEM
    *&      Form  create_po
    FORM create_po .
      CALL FUNCTION 'BAPI_PO_CREATE1'
          EXPORTING
            poheader                     = l_po_header
           poheaderx                    =  l_po_headerx
         IMPORTING
           exppurchaseorder             = l_purchaseorder
         TABLES
           return                       = t_return
           poitem                       =  t_po_items
           poitemx                      =  t_po_itemsx
           poaccount                    = t_po_account
           poaccountx                   = t_po_accountx
           poservices                   = t_po_services
         posrvaccessvalues            =   t_po_servalue
      WAIT UP TO 15 SECONDS.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    ENDFORM.                    " create_po
    *&      Form  TABLE_UPLOAD
    FORM table_upload  TABLES   p_itab1.  " structure < itab1 #local# >
      "Insert correct name for <...>.
      CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = w_fname1
       filetype                      = 'ASC'
       has_field_separator           = 'X'
       read_by_line                  = 'X'
       replacement                   = '#'
      TABLES
        data_tab                      =  p_itab1.
      LOOP AT p_itab1.
        MOVE-CORRESPONDING p_itab1 TO str.
        APPEND str.
        CLEAR p_itab1.
      ENDLOOP.
    *  WAIT UP TO 5 SECONDS.
    ENDFORM.                    " TABLE_UPLOAD

    Hi,
    Check this sample code..how to use the BAPI_PO_CREATE1.
    REPORT  Z_TEST_PO   .
    *DATA DECLARATION
    CONSTANTS : C_X VALUE 'X'.
    *Structures to hold PO header data
    DATA : HEADER LIKE BAPIMEPOHEADER ,
    HEADERX LIKE BAPIMEPOHEADERX .
    *Structures to hold PO account data
    DATA : ACCOUNT LIKE BAPIMEPOACCOUNT OCCURS 0 WITH HEADER LINE ,
    ACCOUNTX LIKE BAPIMEPOACCOUNTX OCCURS 0 WITH HEADER LINE .
    *Internal Tables to hold PO ITEM DATA
    DATA : ITEM LIKE BAPIMEPOITEM OCCURS 0 WITH HEADER LINE,
    ITEMX LIKE BAPIMEPOITEMX OCCURS 0 WITH HEADER LINE,
    *Internal table to hold messages from BAPI call
    RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,
    *Internal table to hold messages from BAPI call
    POCONTRACTLIMITS LIKE BAPIESUCC OCCURS 0 WITH HEADER LINE.
    DATA : W_HEADER(40) VALUE 'PO Header',
    PURCHASEORDER LIKE BAPIMEPOHEADER-PO_NUMBER,
    DELIVERY_DATE LIKE BAPIMEPOSCHEDULE-DELIVERY_DATE.
    DATA : WS_LANGU LIKE SY-LANGU.
    *text-001 = 'PO Header' - define as text element
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : COMPANY LIKE HEADER-COMP_CODE DEFAULT '122' ,
    DOCTYP LIKE HEADER-DOC_TYPE DEFAULT 'NB' ,
    CDATE LIKE HEADER-CREAT_DATE DEFAULT SY-DATUM ,
    VENDOR LIKE HEADER-VENDOR DEFAULT '2000000012' ,
    PUR_ORG LIKE HEADER-PURCH_ORG DEFAULT 'PU01' ,
    PUR_GRP LIKE HEADER-PUR_GROUP DEFAULT '005' .
    *sociedad like HEADER-COMP_CODE default '122' ,
    *vendedor like HEADER-SALES_PERS default 'sale person'.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS : ITEM_NUM LIKE ITEM-PO_ITEM DEFAULT '00010',
    MATERIAL LIKE ITEM-MATERIAL DEFAULT '12000000' ,
    TIPO_IMP LIKE ITEM-ACCTASSCAT DEFAULT 'K' ,
    *pos_doc like ITEM-ITEM_CAT default 'F' ,
    SHORTTXT LIKE ITEM-SHORT_TEXT DEFAULT 'PRUEBA BAPI' ,
    GRUP_ART LIKE ITEM-MATL_GROUP DEFAULT '817230000' ,
    PLANT LIKE ITEM-PLANT DEFAULT '3001' ,
    MPE LIKE ITEM-TRACKINGNO DEFAULT '9999' ,
    *contrato like ITEM-AGREEMENT default '4904000003' ,
    *quantity like ITEM-QUANTITY default 1 .
    PO_UNIT LIKE ITEM-PO_UNIT DEFAULT 'EA'.
    SELECTION-SCREEN END OF BLOCK B2.
    * Par?mnetros de imputaci?n
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-004.
    PARAMETERS : CENTRO LIKE ACCOUNT-COSTCENTER DEFAULT '1220813150',
    CUENTA LIKE ACCOUNT-GL_ACCOUNT DEFAULT '6631400' ,
    NUM_POS LIKE ACCOUNT-PO_ITEM DEFAULT '10' ,
    SERIAL LIKE ACCOUNT-SERIAL_NO DEFAULT '01' ,
    IND_IMP LIKE ACCOUNT-TAX_CODE DEFAULT 'I2' .
    SELECTION-SCREEN END OF BLOCK B3.
    START-OF-SELECTION.
    *DATA POPULATION
      WS_LANGU = SY-LANGU. "Language variable
    *POPULATE HEADER DATA FOR PO
    *HEADER-COMP_CODE = sociedad .
      HEADER-DOC_TYPE = DOCTYP .
      HEADER-VENDOR = VENDOR .
      HEADER-CREAT_DATE = CDATE .
      HEADER-CREATED_BY = 'TD17191' .
      HEADER-PURCH_ORG = PUR_ORG .
      HEADER-PUR_GROUP = PUR_GRP .
      HEADER-COMP_CODE = COMPANY .
      HEADER-LANGU = WS_LANGU .
    *HEADER-SALES_PERS = vendedor .
    *HEADER-CURRENCY = 'DOP' .
    *HEADER-ITEM_INTVL = 10 .
    *HEADER-PMNTTRMS = 'N30' .
    *HEADER-EXCH_RATE = 1 .
    *POPULATE HEADER FLAG.
      HEADERX-COMP_CODE = C_X.
      HEADERX-DOC_TYPE = C_X.
      HEADERX-VENDOR = C_X.
      HEADERX-CREAT_DATE = C_X.
      HEADERX-CREATED_BY = C_X.
      HEADERX-PURCH_ORG = C_X.
      HEADERX-PUR_GROUP = C_X.
      HEADERX-LANGU = C_X.
    *HEADERX-sales_pers = c_x.
    *HEADERX-CURRENCY = c_x.
    *HEADER-ITEM_INTVL = c_x.
    *HEADER-PMNTTRMS = c_x.
    *HEADER-EXCH_RATE = c_x.
    *HEADER-EXCH_RATE = c_x.
    *POPULATE ITEM DATA.
      ITEM-PO_ITEM = ITEM_NUM.
      ITEM-QUANTITY = '1'.
    *ITEM-MATERIAL = material .
      ITEM-SHORT_TEXT = 'prueba bapi_po_create1'.
    *ITEM-TAX_CODE = ''.
      ITEM-ACCTASSCAT = 'K' .
    *ITEM-ITEM_CAT = 'D' .
      ITEM-MATL_GROUP = '817230000' .
      ITEM-PLANT = '3001' .
      ITEM-TRACKINGNO = '99999'.
      ITEM-PREQ_NAME = 'test'.
    *ITEM-AGREEMENT = '' .
    *ITEM-AGMT_ITEM = ''.
      ITEM-QUANTITY = '1' .
      ITEM-PO_UNIT = 'EA'.
    *ITEM-ORDERPR_UN = 'EA'.
      ITEM-CONV_NUM1 = '1'.
      ITEM-CONV_DEN1 = '1'.
      ITEM-NET_PRICE = '1000000' .
      ITEM-PRICE_UNIT = '1'.
      ITEM-GR_PR_TIME = '0'.
      ITEM-PRNT_PRICE = 'X'.
      ITEM-UNLIMITED_DLV = 'X'.
      ITEM-GR_IND = 'X' .
      ITEM-IR_IND = 'X' .
      ITEM-GR_BASEDIV = 'X'.
    *ITEM-PCKG_NO = '' .
      APPEND ITEM. CLEAR ITEM.
    *POPULATE ITEM FLAG TABLE
      ITEMX-PO_ITEM = ITEM_NUM.
      ITEMX-PO_ITEMX = C_X.
    *ITEMX-MATERIAL = C_X.
      ITEMX-SHORT_TEXT = C_X.
      ITEMX-QUANTITY = C_X.
    *ITEMX-TAX_CODE = C_X.
      ITEMX-ACCTASSCAT = C_X.
    *ITEMX-ITEM_CAT = c_x.
      ITEMX-MATL_GROUP = C_X.
      ITEMX-PLANT = C_X.
      ITEMX-TRACKINGNO = C_X.
      ITEMX-PREQ_NAME = C_X.
    *ITEMX-AGREEMENT = C_X.
    *ITEMX-AGMT_ITEM = c_x.
      ITEMX-STGE_LOC = C_X.
      ITEMX-QUANTITY = C_X.
      ITEMX-PO_UNIT = C_X.
    *ITEMX-ORDERPR_UN = C_X.
      ITEMX-CONV_NUM1 = C_X.
      ITEMX-CONV_DEN1 = C_X.
      ITEMX-NET_PRICE = C_X.
      ITEMX-PRICE_UNIT = C_X.
      ITEMX-GR_PR_TIME = C_X.
      ITEMX-PRNT_PRICE = C_X.
      ITEMX-UNLIMITED_DLV = C_X.
      ITEMX-GR_IND = C_X .
      ITEMX-IR_IND = C_X .
      ITEMX-GR_BASEDIV = C_X .
      APPEND ITEMX. CLEAR ITEMX.
    *POPULATE ACCOUNT DATA.
      ACCOUNT-PO_ITEM = ITEM_NUM.
      ACCOUNT-SERIAL_NO = SERIAL .
      ACCOUNT-CREAT_DATE = SY-DATUM .
      ACCOUNT-COSTCENTER = CENTRO .
      ACCOUNT-GL_ACCOUNT = CUENTA .
      ACCOUNT-GR_RCPT = 'tester'.
      APPEND ACCOUNT. CLEAR ACCOUNT.
    *POPULATE ACCOUNT FLAG TABLE.
      ACCOUNTX-PO_ITEM = ITEM_NUM .
      ACCOUNTX-PO_ITEMX = C_X .
      ACCOUNTX-SERIAL_NO = SERIAL .
      ACCOUNTX-SERIAL_NOX = C_X .
      ACCOUNTX-CREAT_DATE = C_X .
      ACCOUNTX-COSTCENTER = C_X .
      ACCOUNTX-GL_ACCOUNT = C_X .
      ACCOUNT-GR_RCPT = C_X.
      APPEND ACCOUNTX. CLEAR ACCOUNTX.
    *BAPI CALL
      CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          POHEADER         = HEADER
          POHEADERX        = HEADERX
        IMPORTING
          EXPPURCHASEORDER = PURCHASEORDER
        TABLES
          RETURN           = RETURN
          POITEM           = ITEM
          POITEMX          = ITEMX
          POACCOUNT        = ACCOUNT
          POACCOUNTX       = ACCOUNTX.
    *Confirm the document creation by calling database COMMIT
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
      WAIT = 'X'
    * IMPORTING
    * RETURN =
    END-OF-SELECTION.
    *Output the messages returned from BAPI call
      LOOP AT RETURN.
        WRITE / RETURN-MESSAGE.
      ENDLOOP.
    Regards
    vijay

  • R12 Ar_receipt_api_pub.Create_cash API error

    According to Oracle Receivables Reference Guide
    Try to test the API : Ar_receipt_api_pub.Create_cash , failed with error message
    Test code :
    declare
    -- Local variables here
    l_cr_id integer;
    l_msg_count integer;
    l_msg_data varchar2(200);
    l_msg_data_out varchar2(200);
    l_count integer;
    l_return_status varchar2(20);
    begin
    fnd_global.apps_initialize (user_id => 1318,resp_id =>50559,resp_appl_id => 222);
    -- Test statements here
    Ar_receipt_api_pub.Create_cash(
    p_api_version => 1.0,
    p_init_msg_list => FND_API.G_TRUE,
    p_receipt_number => 'aj_test_api_1',
    p_amount => 1000,
    p_receipt_method_id => 1001,
    p_customer_name => 'Computer Service and Rentals',
    p_cr_id => l_cr_id,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data);
    IF l_msg_count = 1 Then
    --there is one message raised by the API, so it has been sent out
    --in the parameter x_msg_data, get it.
    dbms_output.put_line('l_msg_data '||l_msg_data);
    ELSIF l_msg_count > 1 Then
    --the messages on the stack are more than one so call them in a loop
    -- and put the messages in a PL/SQL table.
    LOOP
    IF nvl(l_count,0) < l_msg_count THEN
    l_count := nvl(l_count,0) +1 ;
    l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
    IF l_count = 1 THEN
    dbms_output.put_line('l_msg_data 1 '||l_msg_data);
    ELSIF l_count = 2 THEN
    dbms_output.put_line('l_msg_data 2 '||l_msg_data);
    ELSIF l_count = 3 THEN
    dbms_output.put_line('l_msg_data 3 '||l_msg_data);
    ELSIF l_count = 4 THEN
    dbms_output.put_line('l_msg_data 4 '||l_msg_data);
    ELSIF l_count = 5 THEN
    dbms_output.put_line('l_msg_data 5 '||l_msg_data);
    ELSIF l_count = 6 THEN
    dbms_output.put_line('l_msg_data 6 '||l_msg_data);
    END IF;
    dbms_output.put_line('l_msg_data
    '||to_char(l_count)||': '||l_msg_data);
    ELSE
    EXIT;
    END IF;
    END LOOP;
    END IF;
    Commit;
    end;
    Output:
    l_msg_data 1 Functional currency defaulted as the receipt currency.
    l_msg_data
    1: Functional currency defaulted as the receipt currency.
    l_msg_data 2 Please correct the cash account assignment.
    l_msg_data
    2: Please correct the cash account assignment.
    l_msg_data 3 The entered values for the descriptive flexfield AR_CASH_RECEIPTS is invalid.
    l_msg_data
    3: The entered values for the descriptive flexfield AR_CASH_RECEIPTS is invalid.
    l_msg_data 4 CREATE_CASH : ORA-06502: PL/SQL: 数字或值错误
    l_msg_data
    4: CREATE_CASH : ORA-06502: PL/SQL: 数字或值错误
    l_msg_data 5 ORA-06502: PL/SQL: 数字或值错误 in Package AR_RECEIPT_API_PUB Procedure Create_cash
    l_msg_data
    5: ORA-06502: PL/SQL: 数字或值错误 in Package AR_RECEIPT_API_PUB Procedure Create_cash

    Message 1: Put the currency in the API parameter (Name: p_currency_code)
    Message 2: Check Oracle Support Note 946902.1 (disable segment value, but CCID is active????)
    Message 3: Context Field for Descriptive Flexfield 'Receipt Information' has a Default Value, but the Context Field Value for that default value is disabled, see Oracle Support Note 956214.1

  • Not able to post an accrual jnl in Oracle GL

    Journal Import Execution Report Date: 18-MAR-09 10:11
    Concurrent Request ID: 946366 Page: 1
    Total Total Total Total Unbalanced Total Unbalanced Total Flex Total Non-Flex
    Journal Entry Source Name Group Id Status Lines Batches Headers Batches Headers Errors Errors
    Spreadsheet Error 2 1 1 0 0 0 2
    *** TOTALS *** 2 1 1 0 0 0 2
    ======================================================= Batches Created ========================================================
    Total Total Total Total
    Warning Batch Name Period Name Lines Headers Accounted Debits Accounted Credits
    ================================================== Batches Posted to Suspense ==================================================
    Flexfield Line
    Error Code Batch Name Period Name Header Name Number Accounting Flexfield
    ================================================= Unbalanced Journal Entries** =================================================
    Error Total
    Code Journal Entry Name Batch Name Lines Period Name Total Debits Total Credits
    ========================================================= Error Lines ==========================================================
    Accounting
    Error Code Source Date Currency Entered Debit Entered Credit Accounting Flexfield/CCID
    ER09 Spreadsheet 31-MAR-09 AUD 1 0 21.34110.0000.00.71402.767
    ER09 Spreadsheet 31-MAR-09 AUD 0 1 21.00000.0000.90.71410.000
    ========================================================== Error Key ===========================================================
    Period Error Codes
    EP01 This date is not in any open or future enterable period.
    EP02 This set of books does not have any open or future enterable periods.
    EP03 This date is not within any period in an open encumbrance year.
    EP04 This date is not a business day.
    EP05 There are no business days in this period.
    XX Journal Import Execution Report Date: 18-MAR-09 10:11
    Concurrent Request ID: 946366 Page: 2
    ========================================================== Error Key ===========================================================
    Unbalanced Journal Error Codes
    WU01 Warning: This journal entry is unbalanced. It is accepted because suspense posting is allowed in this set of books.
    EU02 This journal entry is unbalanced and suspense posting is not allowed in this set of books.
    EU03 This encumbrance journal entry is unbalanced and the Reserve for Encumbrance account is not defined.
    Flexfield Error Codes
    EF01 This Accounting Flexfield is inactive for this accounting date.
    EF02 Detail posting not allowed for this Accounting Flexfield.
    EF03 Disabled Accounting Flexfield.
    EF04 This is an invalid Accounting Flexfield. Check your cross-validation rules and segment values.
    EF05 There is no Accounting Flexfield with this Code Combination ID.
    Foreign Currency Error Codes
    EC01 A conversion rate must be entered when using the User conversion rate type.
    EC02 There is no conversion date supplied.
    EC03 A conversion rate type or an accounted amount must be supplied when entering foreign currency journal lines.
    EC06 There is no conversion rate for this currency, conversion type, and conversion date.
    EC08 Invalid currency code.
    EC09 No currencies are enabled.
    EC10 Encumbrance journals cannot be created in a foreign currency.
    EC11 Invalid conversion rate type.
    EC12 The entered amount must equal the accounted amount in a functional or STAT currency journal line.
    EC13 Amount is too large.
    ECW1 Warning: Converted amounts could not be validated because the conversion rate type is not specified.
    Budget Error Codes
    EB01 A budget version is required for budget lines.
    EB02 Journals cannot be created for a frozen budget.
    EB03 The budget year is not open.
    EB04 This budget does not exist for this set of books.
    EB05 The encumbrance_type_id column must be null for budget journals.
    EB06 A period name is required for budget journals.
    EB07 This period name is not valid. Check calendar for valid periods.
    EB08 Average journals cannot be created for budgets.
    EB09 Originating company information cannot be specified for budgets.
    Encumbrance Error Codes
    EE01 An encumbrance type is required for encumbrance lines.
    EE02 Invalid or disabled encumbrance type.
    EE03 Encumbrance journals cannot be created in the STAT currency.
    EE04 The BUDGET_VERSION_ID column must be null for encumbrance lines.
    EE05 Average journals cannot be created for encumbrances.
    EE06 Originating company information cannot be specified for encumbrances.
    Reversal Error Codes
    ER01 A reversal period name must be provided.
    XXXXXXX Journal Import Execution Report Date: 18-MAR-09 10:11
    Concurrent Request ID: 946366 Page: 3
    ========================================================== Error Key ===========================================================
    Reversal Error Codes
    ER02 This reversal period name is invalid. Check your calendar for valid periods.
    ER03 A reversal date must be provided
    ER04 This reversal date is not in a valid period.
    ER05 This reversal date is not in your database date format.
    ER06 Your reversal date must be the same as or after your effective date.
    ER07 This reversal date is not a business day.
    ER08 There are no business days in your reversal period.
    ER09 Default reversal information could not be determined.
    Descriptive Flexfield Error Codes
    ED01 The context and attribute values do not form a valid descriptive flexfield for Journals - Journal Entry Lines.
    ED02 The context and attribute values do not form a valid descriptive flexfield for Journals - Captured Information.
    ED03 The context and attribute values do not form a valid descriptive flexfield for Value Added Tax.
    Miscellaneous Error Codes
    EM01 Invalid journal entry category.
    EM02 There are no journal entry categories defined.
    EM03 Invalid set of books id.
    EM04 The value in the ACTUAL_FLAG must be "A" (actuals), "B" (budgets), or "E" (encumbrances).
    EM05 The encumbrance_type_id column must be null for actual journals.
    EM06 The budget_version_id column must be null for actual journals.
    EM07 A statistical amount belongs in the entered_dr(cr) column when entering a STAT currency journal line.
    EM09 There is no Transaction Code defined.
    EM10 Invalid Transaction Code.
    EM12 An Oracle error occurred when generating sequential numbering.
    EM13 The assigned sequence is inactive.
    EM14 There is a sequential numbering setup error resulting from a missing grant or synonym.
    EM17 Sequential numbering is always used and there is no assignment for this set of books and journal entry category.
    EM18 Manual document sequences cannot be used with Journal Import.
    EM19 Value Added Tax data is only valid in conjunction with actual journals.
    EM21 Budgetary Control must be enabled to import this batch.
    EM22 A conversion rate must be defined for this accounting date, your default conversion rate type, and your dual currency.
    EM23 There is no value entered for the Dual Currency Default Rate Type profile option.
    EM24 Average journals can only be imported into consolidation sets of books.
    EM25 Invalid average journal flag. Valid values are "Y", "N", and null.
    EM26 Invalid originating company.
    EM27 Originating company information can only be specified when intercompany balancing is enabled.
    ** Batches listed under "Unbalanced Batches**" have not been imported.
    ***** End of Report *****
    I am geting the above report output, Please suggest.
    Thanks in advance,
    Ajit

    General Ledger: Version : 11.5.0 - Development
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    GLPPOS module: Posting
    Current system time is 27-JUN-2011 08:55:27
    glpmai() 27-JUN-2011 08:55:27SHRD0176: GLPPOS started in debug mode...
    PPOS0003: *** Posting Process Started ***
    PPOS0004: All phases to posting will be detailed in this log.
    PPOS0219: glpmai() - Your Posting Run ID is 32403
    glpini() 27-JUN-2011 08:55:27
    gllock() 27-JUN-2011 08:55:27SHRD0181: glpini - Lock Name = GL_OPEN_POST_20609
    gludlk() 27-JUN-2011 08:55:27<< gludlk() 27-JUN-2011 08:55:27
    SHRD0180: glpini - Performing action >> Placed SHARE_MODE lock...
    << gllock() 27-JUN-2011 08:55:27
    SHRD0180: glpini() - Performing action >> check_batches_exist...
    glusts() 27-JUN-2011 08:55:27
    glucce() 27-JUN-2011 08:55:27
    glugsn() 27-JUN-2011 08:55:27<< glugsn() 27-JUN-2011 08:55:27
    << glucce() 27-JUN-2011 08:55:27
    << glusts() 27-JUN-2011 08:55:27
    Secondary tracking segment disabled
    SHRD0180: glpini() - Performing action >> get_bal_seg_name...
    SHRD0180: glpini() - Performing action >> get_sob_info...
    SHRD0181: glpini() - MRC TYPE = P
    SHRD0180: glpini() - Performing action >> update_batch_status...
    glpuch() 27-JUN-2011 08:55:27SHRD0180: glpuch() - Performing action >> update_cons_history(G/D/F)...
    << glpuch() 27-JUN-2011 08:55:27
    glpueh() 27-JUN-2011 08:55:27SHRD0180: glpueh() - Performing action >> update_elim_history(G/D/F)...
    << glpueh() 27-JUN-2011 08:55:27
    SHRD0180: glpini() - Performing action >> check_mrc_rpt_sob_exist...
    SHRD0180: glpini() - Performing action >> check_budget_jes_exist...
    SHRD0180: glpini() - Performing action >> check_mixed_stat_jes_exist...
    SHRD0180: glpini() - Performing action >> check_adj_periods_exist...
    SHRD0181: glpini() - control->sob_id = 20609
    SHRD0181: glpini() - control->coa_id = 52930
    SHRD0181: glpini() - control->prun_id = 32403
    SHRD0181: glpini() - control->func_curr_code = INDIAN
    SHRD0181: glpini() - control->period_set_name = DHEERAJ
    SHRD0181: glpini() - control->period_type = 685
    SHRD0181: glpini() - control->net_income_ccid = 0
    SHRD0181: glpini() - control->rounding_ccid = 0
    SHRD0181: glpini() - control->cons_sob = FALSE
    SHRD0181: glpini() - control->ab_enabled = FALSE
    SHRD0181: glpini() - control->bc_enabled = FALSE
    SHRD0181: glpini() - control->ic_allowed = TRUE
    SHRD0181: glpini() - control->sus_allowed = TRUE
    SHRD0181: glpini() - control->track_rounding_imbal = FALSE
    SHRD0181: glpini() - control->tax_enabled = TRUE
    SHRD0181: glpini() - control->aprv_enabled = FALSE
    SHRD0181: glpini() - control->batches_exist = TRUE
    SHRD0181: glpini() - control->actual_ab_jes_exist = FALSE
    SHRD0181: glpini() - control->foreign_ab_jes_exist = FALSE
    SHRD0181: glpini() - control->budget_jes_exist = FALSE
    SHRD0181: glpini() - control->mixed_stat_jes_exist = FALSE
    SHRD0181: glpini() - control->adj_periods_exist = FALSE
    SHRD0181: glpini() - control->cons_jes_exist = FALSE
    SHRD0181: glpini() - control->acct_cat_bal = FALSE
    SHRD0181: glpini() - control->mrc_primary_sob = FALSE
    SHRD0181: glpini() - control->max_days_roll_fwd = 32
    SHRD0181: glpini() - control->min_aggregate_num = 0
    SHRD0181: glpini() - control->max_aggregate_num = 0
    SHRD0181: glpini() - control->industry = C
    SHRD0181: glpini() - control->bal_seg_name = SEGMENT1
    SHRD0181: glpini() - control->bal_seg_num = 0
    SHRD0181: glpini() - control->user_name = DHEERAJ
    SHRD0181: glpini() - control->user_id = 1008079
    SHRD0181: glpini() - control->login_id = 2894296
    SHRD0181: glpini() - control->request_id = 3130531
    SHRD0181: glpini() - control->program_id = 101
    SHRD0181: glpini() - control->dmode = TRUE
    << glpini() 27-JUN-2011 08:55:27
    glppva() 27-JUN-2011 08:55:27SHRD0180: glppva() - Performing action >> Check for untaxed journals...
    << glppva() 27-JUN-2011 08:55:27
    glpmpi() 27-JUN-2011 08:55:27
    gluddl() 27-JUN-2011 08:55:27<< gluddl() 27-JUN-2011 08:55:27
    gluddl() 27-JUN-2011 08:55:27-- gluddl ad.do_ddl error buffer begin
    do_ddl(APPLSYS, SQLGL, 1, $statement$, gl_posting_interim_32403): private_do_ddl(APPS, APPLSYS, GL, 1, $statement$, GL_POSTING_INTERIM_32403): do_cd_tab_cd_seq(0, APPS, GL, 1, GL_POSTING_INTERIM_32403, $statement$): : do_apps_ddl(GL, $statement$): : substr($statement$,1,255)='
    create table gl_posting_interim_32403
         (code_combination_id number(15) not null,
         period_name     varchar2(15) not null,
         set_of_books_id number(15) not null,
         currency_code varchar2(15) not null,
         period_year     number(15),
         pe'
    -- gluddl ad.do_ddl error buffer end
    -- gluddl Message Dictionary Start:
    do_ddl(APPLSYS, SQLGL, 1, $statement$, gl_posting_interim_32403): private_do_ddl(APPS, APPLSYS, GL, 1, $statement$, GL_POSTING_INTERIM_32403): do_cd_tab_cd_seq(0, APPS, GL, 1, GL_POSTING_INTERIM_32403, $statement$): : do_apps_ddl(GL, $statement$): : substr($statement$,1,255)='
    create table gl_posting_interim_32403
         (code_combination_id number(15) not null,
         period_name     varchar2(15) not null,
         set_of_books_id number(15) not null,
         currency_code varchar2(15) not null,
         period_year     number(15),
         pe'
    ORA-01658: unable to create INITIAL extent for segment in tablespace A
    -- gluddl Message Dictionary End
    <x gluddl() 27-JUN-2011 08:55:27
    SHRD0187: Encountered the following error in routine gluddl():
    ORA-01658: unable to create INITIAL extent for segment in tablespace A
    SHRD0030: glpmpi() encountered an error returning from err_gluddl:
    <x glpmpi() 27-JUN-2011 08:55:27
    gluerr() 27-JUN-2011 08:55:27Error in ROUTINE: glpmpi, status: 0
    SHRD0043: ERROR:
    sqlcaid: sqlabc: 0 sqlcode: 0 sqlerrml: 0
    sqlerrmc:
    ORA-01658: unable to create INITIAL extent for segment in tablespace A
    sqlerrp:      sqlerrd: 0 0 1 0 0 0
    sqlwarn: sqltext:
    SHRD0044: Process logging off database and exiting ...
    glpuch() 27-JUN-2011 08:55:27SHRD0180: glpuch() - Performing action >> update_cons_history(G/D/F)...
    << glpuch() 27-JUN-2011 08:55:27
    glpueh() 27-JUN-2011 08:55:27SHRD0180: glpueh() - Performing action >> update_elim_history(G/D/F)...
    << glpueh() 27-JUN-2011 08:55:27
    PPOS0002: Posting terminated with fatal errors
    <x glpmai() 27-JUN-2011 08:55:27
    Executing request completion options...
    Finished executing request completion options.
    GLPPOS - process exiting with failure.
    Exceptions posted by this request:
    Concurrent Request for "Posting" has completed with error.
    Concurrent request completed
    Current system time is 27-JUN-2011 08:55:27
    please help me to solve this problem when iam trying to post journals in GL Iam getting this error messages

  • OBA3 (Customer / Vendor Tolerance) and OBA4 (FI Tolerancde Group for User)

    Hi Expert,
    With reference to the subject of this post, could anyone can highlight to me the actual difference between these 2 tolerance settings?
    I use OBA4 to set the payment different for cash discount and payment differences, and it works.
    Therefore, I wonder what is the main functions for OBA3?  Any inter-relation between this 2 tolerance settings?
    Both settings also have the section of "Permitted payment difference"...
    In OBA3, the help files says that ... "In this step, you specify the tolerances for vendors. These tolerances are used for dealing with differences in payment and residual items which can occur during payment settlement..."
    Kindly advise.
    Thanks and regards,
    Sbmel

    Thanks for the fast reply.
    Therefore, technically to say that if I want to limit the cash discount given or received, from vendor/customer, I can just create "OBA4 setup user wise, and you assign this group to user" ... and from this settings, I just need to create:
    Group: <Blank>
    Company Code: My desired company code
    Currency: company code currency (defaulted per company code)
    Cash Discount per line item to: 0
    and at the permitted payment difference section:
    Revenue: Cash discount adj to: 0
    Expense: Cash discount adj to: 0
    Right?
    Thanks
    Sbmel

  • Bdc programing

    Hi,
    i am new to bdc.in my req.. they asked me to change bapi function module and i want replace with bdc. i want to do recording for ME21n or ME21 Tcode and bdc Session method.plz let me know the process by step by step.if any one have code for this send me.for every 1000 line items i want to crate session.
    my input file type:
    rectyp      type  char1,            " Type of Record indicator - H /T / D
             ebeln       type  ebeln,            " Purchasing Document Number
             bukrs       type zlegacy_company,   " Company Code
             ekgrp       type  bkgrp,            " Purchasing Group
             bsart(6),                           " Purchasing Document Type
             ekorg       type  ekorg,            " Purchasing Organization
             lifnr       type  elifn,            " Vendor Account Number
             bedat       type  ebdat,            " Purchasing Document Date
             ebelp       type  ebelp,            " Item Number of Purchasing Documen
             knttp       type  knttp,            " Account Assignment Category
             matkl       type  matkl,            " Material Group
             werks       type  werks,            " Plant
             txz01       type  txz01,            " Short Text
             menge(13)   type  c,                " Purchase Order Quantity
             meins       type  bstme,            " Purchase Order Unit of Measure
             netpr(16)   type   c,               " Net Price in Purchasing Document
             peinh(5)    type    c,              " Price Unit
             bprme       type  bbprm,            " Order Price Unit (Purchasing)
             eeind       type  datum,            " Delivery Date
             mwskz       type  mwskz,            " Sales Tax Code
             saknr       type  saknr,            " Cost Element
             prctr(15),                          " Profit Center
             po_number   type ebeln,             " PO Number
             bwart       type bwart,             " Movement type
             po_item     type ebelp,             " PO Line Item
             bldat       type bldat,             " Document Date
             lfsnr       type lfsnr,             " Delivery Note
             frbnr       type frbnr,             " Bill of Laden
             bktxt       type bktxt,             " Header Text
             erfmg(13)   type c,
    thanks,
    ankitha

    Hi Ankitha,
    Its not possible to use BDC for ME21N, becos this is Enjoy Tcode. Better create program using BAPI_PO_CREATE1 Bapi.
    if u want here is the code with bapi.....
    FORM create_sto .
    REFRESH: i_errpo, i_error.
    CLEAR: w_header, i_errpo, i_error, v_success, v_error.
    LOOP AT i_header_sa INTO w_header.
    CLEAR: w_errpo, w_poheaderx, w_exppurchaseorder, w_expheader,
    w_return, w_poitem, w_poitemx, w_poschedule, w_poschedulex,
    i_return, w_poitem, w_poitemx, i_poschedule, i_poschedulex.
    REFRESH: i_return, i_poitem, i_poitemx, i_poschedule, i_poschedulex.
    *--Fill Header
    w_poheader-po_number = w_header-ebeln.
    w_poheader-doc_type = 'ZU'.
    *--The supplying plant is mapped based on the recieving plant in from the ZCA_CONV_UTILITY.
    The conversion is based on the new values of the recieving plant and storage location
    v_value_old = w_header-bukrs.
    PERFORM convert TABLES i_values
    USING 'BUKRS'
    v_value_old
    CHANGING v_value_new.
    w_poheader-comp_code = v_value_new(4).
    w_poheader-pur_group = w_header-ekgrp.
    CLEAR: v_value_old, v_value_new.
    v_value_old = w_header-ekorg.
    PERFORM convert TABLES i_values
    USING 'EKORG'
    v_value_old
    CHANGING v_value_new.
    WRITE w_header-aedat+4(2) TO v_po_date(2).
    WRITE w_header-aedat6(2) TO v_po_date2(2).
    WRITE w_header-aedat(4) TO v_po_date+4(4).
    w_poheader-purch_org = v_value_new(4).
    w_poheader-vendor = w_header-lifnr.
    w_poheader-creat_date = v_po_date.
    w_poheader-item_intvl = w_header-pincr.
    w_poheader-langu = w_header-spras.
    w_poheader-subitemint = w_header-upinc.
    w_poheader-vper_start = w_header-kdatb.
    w_poheader-vper_end = w_header-kdate.
    w_poheader-warranty = w_header-gwldt.
    w_poheader-ref_1 = w_header-ihrez.
    w_poheader-sales_pers = w_header-verkf.
    w_poheader-our_ref = w_header-unsez.
    w_poheader-telephone = w_header-telf1.
    w_poheaderx-po_number = 'X'.
    w_poheaderx-doc_type = 'X'.
    w_poheaderx-suppl_plnt = 'X'.
    w_poheaderx-comp_code = 'X'.
    w_poheaderx-pur_group = 'X'.
    w_poheaderx-purch_org = 'X'.
    w_poheaderx-vendor = 'X'.
    w_poheaderx-creat_date = 'X'.
    w_poheaderx-item_intvl = 'X'.
    w_poheaderx-langu = 'X'.
    w_poheaderx-subitemint = 'X'.
    w_poheaderx-vper_start = 'X'.
    w_poheaderx-vper_end = 'X'.
    w_poheaderx-warranty = 'X'.
    w_poheaderx-ref_1 = 'X'.
    w_poheaderx-sales_pers = 'X'.
    w_poheaderx-our_ref = 'X'.
    w_poheaderx-telephone = 'X'.
    CLEAR: w_item, v_poitem.
    LOOP AT i_item INTO w_item WHERE ebeln EQ w_header-ebeln.
    CLEAR: w_zmm_cordlog,
    v_split,
    w_matnr.
    READ TABLE i_zmm_cordlog INTO w_zmm_cordlog WITH KEY ponumber = w_item-ebeln
    poitem = w_item-ebelp.
    IF sy-subrc EQ 0.
    *--If file is processed earlier, rollback work.
    IF NOT w_zmm_cordlog-mdoc561 IS INITIAL. "STO has to be processed for 561 Goods Mvmt
    w_errortab-ponumber = w_item-ebeln.
    w_errortab-poitem = w_item-ebelp.
    w_errortab-message = text-051. "Process STO for 561 Goods Mvmt.
    APPEND w_errortab TO i_errortab.
    ADD 1 TO v_error.
    CLEAR w_errortab.
    PERFORM error_pos.
    CONTINUE.
    ELSE.
    IF NOT w_zmm_cordlog-eccpo IS INITIAL. "STO already exists
    w_errortab-ponumber = w_item-ebeln.
    w_errortab-poitem = w_item-ebelp.
    w_errortab-eccpo = w_zmm_cordlog-eccpo.
    w_errortab-eccpoitem = w_zmm_cordlog-eccpoitem.
    w_errortab-message = text-052. "STO already created, record skipped
    APPEND w_errortab TO i_errortab.
    ADD 1 TO v_error.
    CLEAR w_errortab.
    PERFORM error_pos.
    CONTINUE.
    ENDIF.
    ENDIF.
    ENDIF.
    CLEAR w_mard.
    SELECT SINGLE * FROM mard INTO w_mard
    WHERE matnr EQ w_item-matnr
    AND werks EQ w_item-werks
    AND lgort EQ w_item-lgort.
    IF sy-subrc <> 0.
    w_itmerror-ponumber = w_item-ebeln.
    w_itmerror-poitem = w_item-ebelp.
    CONCATENATE w_item-matnr w_item-werks w_item-lgort text-044
    INTO w_itmerror-message SEPARATED BY space.
    APPEND w_itmerror TO i_itmerror.
    ADD 1 TO v_error.
    CONTINUE.
    ENDIF.
    *--Plant and Storage location conversion
    CLEAR: v_value_old, i_values[], v_value_new.
    CONCATENATE w_item-werks w_item-lgort INTO v_value_old.
    PERFORM convert TABLES i_values
    USING 'WERKSLGORT'
    v_value_old
    CHANGING v_value_new.
    w_item-werks = v_value_new+0(4).
    w_item-lgort = v_value_new+4(4).
    *--The converted recieving plant will be the same as the supplying plant in the new system
    and the supplying storage location would be OW01.
    w_poheader-suppl_plnt = w_item-werks.
    *--Fill item
    w_poitem-po_item = w_item-ebelp.
    w_poitem-material = w_item-matnr.
    w_poitem-plant = w_item-werks.
    w_poitem-stge_loc = w_item-lgort.
    w_poitem-po_unit = w_item-meins.
    PERFORM get_valuation_type USING w_item-matnr
    w_item-werks
    w_item-lgort
    CHANGING w_poitem-val_type.
    IF w_item-matnr CP '*-R'.
    SPLIT w_item-matnr AT '-R' INTO w_item-matnr v_split.
    ELSEIF w_item-matnr CP '*-D'.
    SPLIT w_item-matnr AT '-D' INTO w_item-matnr v_split.
    ENDIF.
    SELECT SINGLE matnr INTO w_matnr
    FROM mara
    WHERE matnr = w_item-matnr.
    IF sy-subrc NE 0.
    w_errortab-ponumber = w_item-ebeln.
    w_errortab-poitem = w_item-ebelp.
    CONCATENATE w_item-matnr 'Does not exist in the MARC table'
    INTO w_errortab-message.
    ADD 1 TO v_error.
    CONTINUE.
    ENDIF.
    w_poitem-matl_group = w_item-matkl.
    w_poitem-item_cat = w_item-pstyp.
    w_poitem-acctasscat = w_item-knttp.
    w_poitem-reminder1 = w_item-mahn1.
    w_poitem-conf_ctrl = w_item-bstae.
    w_poitem-ackn_reqd = w_item-kzabs.
    w_poitem-quantity = w_item-menge.
    w_poitem-reminder2 = w_item-mahn2.
    w_poitem-acknowl_no = w_item-labnr.
    w_poitem-reminder3 = w_item-mahn3.
    w_poitem-trackingno = w_item-bednr.
    w_poitem-gr_pr_time = w_item-webaz.
    w_poitem-under_dlv_tol = w_item-untto.
    w_poitem-qual_insp = w_item-insmk.
    w_poitem-over_dlv_tol = w_item-uebto.
    w_poitem-unlimited_dlv = w_item-uebtk.
    w_poitem-no_more_gr = w_item-elikz.
    w_poitem-shipping = w_item-evers.
    w_poitem-period_ind_expiration_date = ' '.
    APPEND w_poitem TO i_poitem.
    w_poitemx-po_item = w_poitem-po_item.
    w_poitemx-po_itemx = 'X'.
    w_poitemx-material = 'X'.
    w_poitemx-plant = 'X'.
    w_poitemx-stge_loc = 'X'.
    w_poitemx-po_unit = 'X'.
    w_poitemx-val_type = 'X'.
    w_poitemx-matl_group = 'X'.
    w_poitemx-item_cat = 'X'.
    w_poitemx-acctasscat = 'X'.
    w_poitemx-reminder1 = 'X'.
    w_poitemx-conf_ctrl = 'X'.
    w_poitemx-ackn_reqd = 'X'.
    w_poitemx-quantity = 'X'.
    w_poitemx-reminder2 = 'X'.
    w_poitemx-acknowl_no = 'X'.
    w_poitemx-reminder3 = 'X'.
    w_poitemx-trackingno = 'X'.
    w_poitemx-gr_pr_time = 'X'.
    w_poitemx-under_dlv_tol = 'X'.
    w_poitemx-qual_insp = 'X'.
    w_poitemx-over_dlv_tol = 'X'.
    w_poitemx-unlimited_dlv = 'X'.
    w_poitemx-no_more_gr = 'X'.
    w_poitemx-shipping = 'X'.
    w_poitemx-period_ind_expiration_date = 'X'.
    APPEND w_poitemx TO i_poitemx.
    CLEAR w_poitemx.
    CLEAR: w_slines, v_scheditem.
    LOOP AT i_slines INTO w_slines WHERE ebeln EQ w_item-ebeln
    AND ebelp EQ w_item-ebelp.
    *--Fill Schedule lines for PO
    w_poschedule-po_item = w_item-ebelp.
    w_poschedule-sched_line = w_slines-etenr.
    w_poschedule-del_datcat_ext = ' '.
    w_poschedule-delivery_date = w_slines-eindt.
    w_poschedule-quantity = w_slines-menge.
    APPEND w_poschedule TO i_poschedule.
    CLEAR w_poschedule.
    w_poschedulex-po_item = w_item-ebelp.
    w_poschedulex-sched_line = w_slines-etenr.
    w_poschedulex-po_itemx = 'X'.
    w_poschedulex-sched_linex = 'X'.
    w_poschedulex-del_datcat_ext = 'X'.
    w_poschedulex-delivery_date = 'X'.
    w_poschedulex-quantity = 'X'.
    APPEND w_poschedulex TO i_poschedulex.
    CLEAR w_poschedulex.
    CLEAR w_slines.
    ENDLOOP.
    CLEAR: w_poitem,
    w_item.
    ENDLOOP.
    SORT: i_poitem, i_poitemx, i_poschedule, i_poschedulex.
    *--If the import data to BAPI is empty, then raise a message to check the Material Error file for
    any PO items which are skipped.
    The PO in error is also moved to the error file for reprocessing.
    IF w_poheader IS INITIAL OR
    i_poitem[] IS INITIAL.
    CLEAR: w_poheader, w_poheaderx, i_return[], i_poitem, i_poitem[].
    CONTINUE.
    ENDIF.
    *--BAPI call for PO creation
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = w_poheader
    poheaderx = w_poheaderx
    testrun = p_test
    IMPORTING
    exppurchaseorder = w_exppurchaseorder
    expheader = w_expheader
    TABLES
    return = i_return
    poitem = i_poitem
    poitemx = i_poitemx
    poschedule = i_poschedule
    poschedulex = i_poschedulex.
    *--Commit the transaction if a success message is returned, else rollback work.
    Update the legacy PO and items in the ZMM_CORDLOG table
    start of modification
    WAIT UP TO time SECONDS.
    end of modification
    IF NOT i_return[] IS INITIAL.
    LOOP AT i_return INTO w_return.
    *--Read the error messages
    IF w_return-type = 'E'.
    w_errortab-ponumber = w_header-ebeln.
    w_errortab-doctype = w_poheader-doc_type.
    w_errortab-supplplnt = w_poheader-suppl_plnt.
    w_errortab-vendor = w_poheader-vendor.
    w_errortab-eccpo = w_expheader-po_number.
    w_errortab-message = w_return-message(73).
    APPEND w_errortab TO i_errortab.
    ADD 1 TO v_error.
    ROLLBACK WORK.
    ELSEIF w_return-type = 'S'.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc EQ 0.
    v_success = v_success + 1.
    CLEAR w_poitem.
    LOOP AT i_poitem INTO w_poitem.
    w_zmm_cordlog-ponumber = w_poheader-po_number.
    w_zmm_cordlog-poitem = w_poitem-po_item.
    w_zmm_cordlog-doctype = w_poheader-doc_type.
    w_zmm_cordlog-supplplnt = w_poheader-suppl_plnt.
    w_zmm_cordlog-vendor = w_poheader-vendor.
    w_zmm_cordlog-eccpo = w_poheader-po_number.
    w_zmm_cordlog-eccpoitem = w_poitem-po_item.
    w_zmm_cordlog-message = w_return-message(73).
    MODIFY zmm_cordlog FROM w_zmm_cordlog. "Modify DB table
    CLEAR w_zmm_cordlog.
    w_errpo-ebeln = w_poheader-po_number.
    w_errpo-ebelp = w_poitem-po_item.
    APPEND w_errpo TO i_errpo.
    CLEAR w_errpo.
    ENDLOOP.
    ENDIF.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'DEQUEUE_ALL'.
    ENDIF.
    CLEAR: w_header,
    w_poheader,
    w_poheaderx.
    CALL FUNCTION 'DEQUEUE_ALL'.
    ENDLOOP.
    IF NOT i_errpo[] IS INITIAL.
    *--Separate error records (all records for any PO in error).
    PERFORM create_error_file TABLES i_header_sa.
    *--Write data to Application Server
    IF NOT i_error[] IS INITIAL.
    OPEN DATASET p_error FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    MESSAGE e398 WITH text-023 space space space.
    ENDIF.
    LOOP AT i_error INTO w_error.
    TRANSFER w_error TO p_error.
    ENDLOOP.
    ENDIF.
    ENDIF.
    COMMIT WORK.
    ENDFORM. " create_sto
    some other example code with bapi.. for ME21N
    use BAPI_PO_CREATE1.
    check this Sample code,
    REPORT  zpo_create                              .
    PARAMETERS: p-file LIKE rlgrap-filename DEFAULT
                              'c:\demo3.txt'.
    DATA: BEGIN OF itab OCCURS 0,
      line(1000),
      END OF itab.
    DATA l_item(5) TYPE n.
    TABLES : zerror.
    DATA lcounter(3) TYPE n.
    DATA : l_errflag.
    DATA : l_po_header LIKE bapimepoheader.
    DATA : l_po_headerx LIKE bapimepoheaderx.
    DATA : t_po_account LIKE bapimepoaccount OCCURS 0 WITH HEADER LINE.
    DATA : t_po_accountx LIKE bapimepoaccountx OCCURS 0 WITH HEADER LINE.
    DATA : l_new_po(10), l_last_po(10).
    DATA : l_purchaseorder LIKE bapimepoheader-po_number.
    *DATA : L_HEADER LIKE BAPIMEPOHEADER STRUCTURE BAPIMEPOHEADER.
    DATA : BEGIN OF t_po_items OCCURS 0.
            INCLUDE STRUCTURE bapimepoitem.
    DATA : END OF t_po_items.
    DATA : BEGIN OF t_po_itemsx OCCURS 0.
            INCLUDE STRUCTURE bapimepoitemx.
    DATA : END OF t_po_itemsx.
    DATA : BEGIN OF t_return OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA : END OF t_return.
    CLEAR : l_po_header.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = p-file
        filetype                = 'DAT'
      TABLES
        data_tab                = itab
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        OTHERS                  = 6.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      EXIT.
    ENDIF.
    LOOP  AT itab.
      IF itab-line(1) EQ 'K'.
        l_new_po = itab-line(10).
        IF l_last_po NE  l_new_po AND l_last_po NE space.
          PERFORM create_po.
          PERFORM refresh_table.
        ENDIF.
        IF itab-line+13(2) EQ '40'.
          PERFORM append_header.
        ENDIF.
        IF itab-line+13(2) EQ '81'.
          PERFORM append_item.
        ENDIF.
        l_last_po = l_new_po.
      ENDIF.
    ENDLOOP.
    IF sy-subrc EQ 0.
      PERFORM create_po.
      PERFORM refresh_table.
    ENDIF.
    *&      Form  CREATE_PO
    PO Create
    -->  p1        text
    <--  p2        text
    FORM create_po .
      CLEAR : l_purchaseorder.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader                     = l_po_header
         poheaderx                    = l_po_headerx
        POADDRVENDOR                 =
        TESTRUN                      =
        MEMORY_UNCOMPLETE            =
        MEMORY_COMPLETE              =
        POEXPIMPHEADER               =
        POEXPIMPHEADERX              =
        VERSIONS                     =
        NO_MESSAGING                 =
        NO_MESSAGE_REQ               =
        NO_AUTHORITY                 =
        NO_PRICE_FROM_PO             =
       IMPORTING
         exppurchaseorder             = l_purchaseorder
        EXPHEADER                    =
        EXPPOEXPIMPHEADER            =
       TABLES
         return                       = t_return
         poitem                       = t_po_items
         poitemx                      = t_po_itemsx
        POADDRDELIVERY               =
        POSCHEDULE                   =
        POSCHEDULEX                  =
         poaccount                    = t_po_account
        POACCOUNTPROFITSEGMENT       =
         poaccountx                   = t_po_accountx
        POCONDHEADER                 =
        POCONDHEADERX                =
        POCOND                       =
        POCONDX                      =
        POLIMITS                     =
        POCONTRACTLIMITS             =
        POSERVICES                   =
        POSRVACCESSVALUES            =
        POSERVICESTEXT               =
        EXTENSIONIN                  =
        EXTENSIONOUT                 =
        POEXPIMPITEM                 =
        POEXPIMPITEMX                =
        POTEXTHEADER                 =
        POTEXTITEM                   =
        ALLVERSIONS                  =
        POPARTNER                    =
      l_errflag = space.
      lcounter  = 1.
      LOOP AT t_return .
        IF t_return-type = 'E'.
          l_errflag = 'X'.
          GET TIME.
          PERFORM append_error.
        ENDIF.
        WRITE : /1 t_return-message.
      ENDLOOP.
      IF l_errflag EQ space.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
      ENDIF.
    ENDFORM.                    " CREATE_PO
    *&      Form  APPEND_HEADER
    PO Header print
    -->  p1        text
    <--  p2        text
    FORM append_header .
      l_po_header-comp_code = '1000'." Company Code
      l_po_header-doc_type = 'NB'. " Order Typr BSART
      l_po_header-creat_date = sy-datum. " P.O Dt - BEDAT
    *CONCATENATE '0000' ITAB+72(6) INTO L_PO_HEADER-VENDOR .
      l_po_header-vendor = itab-line+71(6).
    *L_PO_HEADER-VENDOR = ITAB+72(6)    " 'ABC'. "Vendor - EKKO-LIFNR
      IF itab-line(4) NE 'K034'.
        l_po_header-purch_org = '2000'. " Purch. Org - EKKO-EKORG
        l_po_header-pur_group = 'F01'. " Purch Group - EKKO-EKGRP
      ELSE.
        l_po_header-purch_org = '1000'. " Purch. Org - EKKO-EKORG
        l_po_header-pur_group = '001'. " Purch Group - EKKO-EKGRP
      ENDIF.
      l_po_header-currency_iso = 'USD'. " Currency Default field for Enjoy
      l_po_header-ref_1       = itab-line+1(9).
    *L_PO_HEADER-DOC_CAT = 'F'. " Account Assign Cat EKPO-KNTTP
    *_PO_HEADER-CREATED_BY = SY-UNAME.
      CLEAR : l_po_headerx.
      l_po_headerx-po_number = 'X'.
      l_po_headerx-comp_code = 'X'." Company Code
      l_po_headerx-doc_type = 'X'. " Order Typr BSART
      l_po_headerx-vendor = 'X'. "Vendor - EKKO-LIFNR
      l_po_headerx-purch_org = 'X'. " Purch. Org - EKKO-EKORG
      l_po_headerx-pur_group = 'X'. " Purch Group - EKKO-EKGRP
      l_po_headerx-currency_iso = 'X'. " Currency Default field for Enjoy
      l_po_headerx-ref_1       = 'X'.
    ENDFORM.                    " APPEND_HEADER
    *&      Form  APPEND_ITEM
    Material Number and Item print
    -->  p1        text
    <--  p2        text
    FORM append_item .
    PO Line Items
      l_item = l_item + 10.
      t_po_items-po_item = l_item.
    *T_PO_ITEMS-PO_ITEM = '00010'." Line Item No - EKPO-EBELP
    *T_PO_ITEMS-SHORT_TEXT = 'KSR TEXT'." Line Item TEXT
      CONCATENATE  '00000000' itab-line+32(10) INTO t_po_items-material.
    *T_PO_ITEMS-MATERIAL = '000000000000000043'. " Material No - EKPO-EMATN
      CONCATENATE  '00000000' itab-line+32(10) INTO t_po_items-ematerial.
      t_po_items-plant = '2001'. " Plant - EKPO-WERKS
      t_po_items-quantity = '1.000'.
      t_po_items-net_price = '10.00'. " EKPO-NETPR
      t_po_items-price_unit = '10 '.
    *T_PO_ITEMS-TAX_CODE = 'A2'.
      IF  itab-line+0(4) EQ 'K034'.
        t_po_items-acctasscat = 'R'.
        t_po_items-plant = '1001'.
        t_po_account-po_item = l_item.
        t_po_account-profit_ctr = 'BR034'.
        t_po_account-gl_account = '0000135075'.
    T_PO_ACCOUNT-CO_AREA  = '1000'.
        APPEND t_po_account.
        CLEAR t_po_account.
        t_po_accountx-po_item = l_item.
        t_po_accountx-profit_ctr = 'X'.
        t_po_accountx-gl_account = 'X'.
    T_PO_ACCOUNTX-CO_AREA  = 'X'.
        APPEND t_po_accountx.
        CLEAR t_po_accountx.
      ENDIF.
      APPEND t_po_items.
      CLEAR t_po_items.
      t_po_itemsx-po_item = l_item.
      t_po_itemsx-po_itemx = 'X'.
      t_po_itemsx-acctasscat = 'X'.
      t_po_itemsx-material = 'X'.
      t_po_itemsx-ematerial = 'X'.
      t_po_itemsx-plant = 'X'.
      t_po_itemsx-quantity = 'X'.
      t_po_itemsx-net_price = 'X'.
      t_po_itemsx-price_unit = 'X'.
    *T_PO_ITEMSX-TAX_CODE = 'X'.
      APPEND t_po_itemsx.
      CLEAR t_po_itemsx.
    Second Line Item
    ENDFORM.                    " APPEND_ITEM
    *&      Form  REFRESH_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM refresh_table .
      REFRESH : t_po_items, t_po_itemsx.
      CLEAR l_item.
    ENDFORM.                    " REFRESH_TABLE
    *&      Form  append_error
          text
    -->  p1        text
    <--  p2        text
    FORM append_error .
      MOVE : sy-datum TO zerror-zdate,
              sy-uzeit TO zerror-ztime,
              itab+3(5) TO zerror-document_no,
              t_return-message    TO zerror-message.
      lcounter =  lcounter + 1.
      zerror-counter = lcounter .
      zerror-rec_type = itab-line(1).
      MODIFY zerror. CLEAR zerror.
      COMMIT WORK.
    ENDFORM.                    " append_error
    ~~Guduri
    Mark the helpful answers
            NAVEEN KUMAR GUDURI

Maybe you are looking for