Proble in Creating Multiple Item PO using BAPI_PO_CREATE1
Hi All..
I am creating PO using BAPI_PO_CREATE1. I have successfully created with single line item but when i tried to create with multiple line items it gives me error in partners(vendors) which i have used in table POPARTNER.
One more thing, I have created using BAPI with same partner roles with single line item but it gives me error in 2 or more line items.
So, Can Anybody help me in this..
Regards,
Meet Gohel
[email protected]
Hi ,
U can use this code n check
*& Report ZPOBAPITRIAL
REPORT ZPOBAPITRIAL.
*DATA DECLARATION
CONSTANTS : C_X VALUE 'X'.
*Structures to hold PO header data
DATA : HEADER LIKE BAPIMEPOHEADER ,
HEADERX LIKE BAPIMEPOHEADERX .
*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.
data : w_header(40) value 'PO Header'.
DATA : it_item type standard table of BAPIMEPOITEM.
DATA : wa_item like BAPIMEPOITEM occurs 0 with header line.
DATA : it_itemx type standard table of BAPIMEPOITEMX.
DATA : wa_itemx like BAPIMEPOITEMX occurs 0 with header line.
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 '0103' ,
doctyp like HEADER-DOC_TYPE default 'NB' ,
item_int like header-item_intvl default '10' ,
cdate like HEADER-CREAT_DATE default sy-datum ,
vendor like HEADER-VENDOR default '0000500001',
pmnttrms like header-pmnttrms default '0007' ,
pur_org like HEADER-PURCH_ORG default '9000' ,
pur_grp like HEADER-PUR_GROUP default '401' ,
currency like header-currency default 'INR' .
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 '10',
material like ITEM-MATERIAL default '000000000300000014' ,
plant like ITEM-PLANT default '7640' ,
quantity like ITEM-QUANTITY default 10.
selection-screen end of block b2.
START-OF-SELECTION.
*DATA POPULATION
ws_langu = sy-langu. "Language variable
*POPULATE HEADER DATA FOR PO
HEADER-COMP_CODE = company .
HEADER-DOC_TYPE = doctyp .
*HEADER-CREAT_DATE = cdate .
header-item_intvl = item_int .
HEADER-VENDOR = vendor .
HEADER-LANGU = ws_langu .
header-pmnttrms = pmnttrms .
HEADER-PURCH_ORG = pur_org .
HEADER-PUR_GROUP = pur_grp .
header-currency = currency .
*POPULATE HEADER FLAG.
HEADERX-comp_code = c_x.
HEADERX-doc_type = c_x.
*HEADERX-creat_date = c_x.
headerx-item_intvl = c_x .
HEADERX-vendor = c_x.
HEADERX-langu = c_x.
headerx-pmnttrms = c_x .
HEADERX-purch_org = c_x.
HEADERX-pur_group = c_x.
*HEADERX-doc_date = c_x.
*POPULATE ITEM DATA.
wa_ITEM-PO_ITEM = item_num.
wa_ITEM-MATERIAL = material.
wa_ITEM-PLANT = plant.
wa_ITEM-QUANTITY = quantity.
append wa_item to it_item.
wa_ITEM-PO_ITEM = '20'.
wa_ITEM-MATERIAL = '000000000300000020'.
wa_ITEM-PLANT = plant.
wa_ITEM-QUANTITY = quantity.
append wa_item to it_item.
*APPEND ITEM.
*POPULATE ITEM FLAG TABLE
wa_ITEMX-PO_ITEM = item_num.
wa_itEMX-MATERIAL = C_X.
wa_ITEMX-PLANT = C_X .
wa_ITEMX-STGE_LOC = C_X .
wa_ITEMX-QUANTITY = C_X .
wa_ITEMX-TAX_CODE = C_X .
wa_ITEMX-ITEM_CAT = C_X .
wa_ITEMX-ACCTASSCAT = C_X .
append wa_itemx to it_itemx.
*APPEND ITEMX.
wa_ITEMX-PO_ITEM = '20'.
wa_itEMX-MATERIAL = C_X.
wa_ITEMX-PLANT = C_X .
wa_ITEMX-STGE_LOC = C_X .
wa_ITEMX-QUANTITY = C_X .
wa_ITEMX-TAX_CODE = C_X .
wa_ITEMX-ITEM_CAT = C_X .
wa_ITEMX-ACCTASSCAT = C_X .
append wa_itemx to it_itemx.
*BAPI CALL
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = HEADER
POHEADERX = HEADERX
POADDRVENDOR =
TESTRUN =
IMPORTING
EXPPURCHASEORDER =
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = RETURN
POITEM = it_ITEM
POITEMX = it_ITEMX.
*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: /001 return-type,
/001 return-message.
ENDLOOP.
award points if helpfull
Similar Messages
-
How to create multiple Purchase Order using the same document number?
HI Friends,
I m in a product which extracts data from SAP and stored in Access database.
For that,while i extracting Purchase Order from the Demo Database (SBODemo_US)for OEC Computers,the same DocNum is used for several Purchase Order using Index Line numbers.
eg:
DocNum for Purchase Order1 -->3000 0 (Index)
DocNum for Purchase Order2 -->3000 1 (Index)
But i can't create multiple Purchase Order using same DocNum manually in SAP B1,Could anybody please help me <b>to create a Purchase Order using same DocumentNumber?</b>
Thanks in Advance
SooriyaKala.PHi,
The problem statement is not quite clear to me.
As far as I understand your statement, I think you want to club multiple orders into one purchase order using the index incrementally.
For this I think once you have created the first purchase order, open the purchase order in edit mode the second time and append the new line items.
If I am getting you wrong please explain the problem statement in more detail.
Regards,
Rara. -
How can i create multiple accounts but use the same itunes?
how can i create multiple accounts but use the same itunes?
Hi iCloud is Making Me Go Crazy,
You will need to create a new Apple ID for your GameCenter and iCloud services. You can continue to use the current Apple ID you share with your Mom for access to iTunes Store purchases if you wish.
Using your Apple ID for Apple services
http://support.apple.com/kb/HT4895
Frequently asked questions about Apple ID
http://support.apple.com/kb/HT5622
Cheers,
- Judy -
Post Author: markeyjd2
CA Forum: Exporting
Greetings forum members,
My question is, in its entirety: Can a single report (rpt file) create multiple PDF files using the export command, ideally one PDF file per DB record?
In my case; I have a Crystal Report that reads data from a DB table containing ~ 500 records. When I export the report to a PDF file, I get one PDF file, with ~ 500 pages.
What I would like to do is export the report to ~ 500 individual PDF files; One file per DB record. The file names would be based on the table's primary key.
Is this possible?Post Author: Micha
CA Forum: Exporting
Hi,
you need some lines of code, but its easy. Dependend on how to start the generation of your 500 PDFs, you can write an ASP page and start it via Web Browser, or a Windows Script and start it via scheduled job...
Here's an abstract of the ASP code I use:
First, you create a recordset (here: "rsc") which gives you the list of ID fields you want to export, then you create CrystalRuntime.Application object, then you loop through the recordset, open your report (here: "oRpt") and set login info. Then set the selectionformula, so that the report displays only the data of the current ID, e.g.:
oRpt.RecordSelectionFormula = "(" & oRpt.RecordSelectionFormula & ") AND {myTab.myVal}=" & rsc("myVal")
Then you export the report, move to the next record in recordset, and repeat the loop until recordset.EOF. Then you close recordset and connection.
Micha -
Error while creating a Service PO using BAPI_PO_CREATE1
Hi,
Im facing Error as "In case of account assignment, please enter acc. assignment data for item" while creating Service PO using BAPI_PO_CREATE1.
Header Data
w_poheader-comp_code = w_src-bukrs. "Company Code
w_poheader-doc_type = w_src-bsart. "Document type
w_poheader-delete_ind = w_src-vrtkz. "Deletion Indicator
CLEAR: lv_date.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = w_src-aedat
IMPORTING
date_internal = lv_date
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
w_poheader-creat_date = lv_date. "Creation Date
w_poheader-created_by = sy-uname. "Creator Name
w_poheader-vendor = w_src-lifnr. "Vendor
w_poheader-pmnttrms = w_src-zterm. "Payment Terms
w_poheader-purch_org = w_src-ekorg. "Purchase Organization
w_poheader-pur_group = w_src-ekgrp. "Purchase Group
w_poheader-ref_1 = w_src-ihrez. "OLD PO
w_poheaderx-comp_code = 'X'. "Company Code
w_poheaderx-doc_type = 'X'. "Document type
w_poheaderx-delete_ind = 'X'. "Deletion Indicator
w_poheaderx-creat_date = 'X'. "Creation Date
w_poheaderx-created_by = 'X'.
w_poheaderx-vendor = 'X'.
w_poheaderx-pmnttrms = 'X'. "Payment Terms
w_poheaderx-purch_org = 'X'. "Purchase Organization
w_poheaderx-pur_group = 'X'. "Purchase Group
w_poheaderx-ref_1 = 'X'.
Item Data
w_poitem-po_item = w_src-ebelp.
IF NOT w_src-elikz IS INITIAL.
w_poitem-delete_ind = w_src-elikz.
ENDIF.
IF NOT w_src-txz01 IS INITIAL.
w_poitem-short_text = w_src-txz01.
ENDIF.
IF NOT w_src-werks IS INITIAL.
w_poitem-plant = w_src-werks.
ENDIF.
Material group
IF NOT w_src-matkl IS INITIAL.
w_poitem-matl_group = w_src-matkl.
ENDIF.
Open or Partial Qty
IF w_src-opqty IS NOT INITIAL.
w_poitem-quantity = w_src-opqty.
ELSEIF NOT w_src-paqty IS INITIAL.
w_poitem-quantity = w_src-paqty.
ENDIF.
IF NOT w_src-meins IS INITIAL.
w_poitem-po_unit = w_src-meins. "Base Unit of Measure
ENDIF.
IF NOT w_src-netpr IS INITIAL.
w_poitem-net_price = w_src-netpr. "Net Price
ENDIF.
IF NOT w_src-mwskz IS INITIAL.
w_poitem-tax_code = w_src-mwskz.
ENDIF.
IF NOT w_src-pstyp IS INITIAL.
w_poitem-item_cat = w_src-pstyp.
ENDIF.
IF NOT w_src-knttp IS INITIAL.
w_poitem-acctasscat = w_src-knttp.
ENDIF.
IF NOT w_src-vrtkz IS INITIAL.
w_poitem-distrib = w_src-vrtkz.
ENDIF.
Package No
IF NOT w_src-packno IS INITIAL.
w_poitem-pckg_no = w_src-packno. "Package no
ENDIF.
IF w_poitem-delete_ind IS INITIAL AND
w_poitem-short_text IS INITIAL AND
w_poitem-plant IS INITIAL AND
w_poitem-matl_group IS INITIAL AND
w_poitem-quantity IS INITIAL AND
w_poitem-po_unit IS INITIAL AND
w_poitem-net_price IS INITIAL AND
w_poitem-tax_code IS INITIAL.
CLEAR lv_item.
ELSE.
APPEND w_poitem TO i_poitem.
CLEAR: w_poitem.
lv_item = 'X'.
ENDIF.
w_poitemx-po_item = w_src-ebelp.
w_poitemx-delete_ind = 'X'.
w_poitemx-short_text = 'X'.
w_poitemx-plant = 'X'.
w_poitemx-matl_group = 'X'.
w_poitemx-quantity = 'X'.
w_poitemx-po_unit = 'X'.
w_poitemx-net_price = 'X'.
w_poitemx-tax_code = 'X'.
w_poitemx-item_cat = 'X'.
w_poitemx-acctasscat = 'X'.
w_poitemx-distrib = 'X'.
IF NOT w_src-packno IS INITIAL.
w_poitemx-pckg_no = 'X'.
ENDIF.
IF lv_item = 'X'.
APPEND w_poitemx TO i_poitemx.
CLEAR: w_poitemx,
lv_item.
ENDIF.
PO Deliery Address
w_poaddrdelivery-po_item = w_src-ebelp.
IF NOT w_src-adrn2 IS INITIAL.
w_poaddrdelivery-addr_no = w_src-adrn2.
APPEND w_poaddrdelivery TO i_poaddrdelivery.
CLEAR w_poaddrdelivery.
ENDIF.
POschedule
w_poschedule-po_item = w_src-ebelp.
CLEAR: lv_date.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = w_src-eindt
IMPORTING
date_internal = lv_date
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF NOT lv_date IS INITIAL.
w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
w_poschedule-delivery_date = lv_date.
w_poschedule-quantity = w_src-menge.
APPEND w_poschedule TO i_poschedule.
CLEAR w_poschedule.
lv_schd = 'X'.
ENDIF.
w_poschedulex-po_item = w_src-ebelp.
w_poschedulex-del_datcat_ext = 'X'.
w_poschedulex-delivery_date = 'X'.
w_poschedulex-quantity = 'X'.
IF lv_schd = 'X'.
APPEND w_poschedulex TO i_poschedulex.
CLEAR : w_poschedulex,
lv_schd.
ENDIF.
PO Account Assignment
w_poaccount-po_item = w_src-ebelp.
w_poaccount-serial_no = w_src-zekkn.
Distribution Indicator is 1
IF w_src-vrtkz EQ '1'.
w_poaccount-distr_perc = w_src-vproz.
IF NOT w_src-menge IS INITIAL.
CLEAR lv_menge.
lv_menge = w_src-menge.
ENDIF.
lv_acct_qty = lv_menge * w_src-vproz / 100.
Get Round value of Quanity
frac = FRAC( lv_acct_qty ).
IF frac EQ 0.
lv_acct_qty = FLOOR( lv_acct_qty ).
ELSE.
lv_acct_qty = CEIL( lv_acct_qty ).
ENDIF.
w_poaccount-quantity = lv_acct_qty.
ELSEIF w_src-vrtkz IS INITIAL.
w_poaccount-quantity = w_src-menge.
ENDIF.
w_poaccount-gl_account = w_src-saknr.
w_poaccount-costcenter = w_src-kostl.
w_poaccount-asset_no = w_src-anln1.
w_poaccount-wbs_element = w_src-wbs.
w_poaccount-network = w_src-nplnr.
w_poaccount-tax_code = w_src-mwskz.
w_poaccount-activity = w_src-vornr.
APPEND w_poaccount TO i_poaccount.
CLEAR w_poaccount.
w_poaccountx-po_item = w_src-ebelp.
w_poaccountx-serial_no = w_src-zekkn.
IF w_src-vrtkz EQ '1'.
w_poaccountx-distr_perc = 'X'.
ENDIF.
w_poaccountx-quantity = 'X'.
w_poaccountx-gl_account = 'X'.
w_poaccountx-costcenter = 'X'.
w_poaccountx-wbs_element = 'X'.
w_poaccountx-network = 'X'.
w_poaccountx-tax_code = 'X'.
w_poaccountx-activity = 'X'.
APPEND w_poaccountx TO i_poaccountx.
CLEAR w_poaccountx.
PO Services
w_poservices-pckg_no = w_src-packno. "Package no
w_poservices-line_no = w_src-srv_line_no. "Line item
w_poservices-ext_line = w_src-extrow. "External line
w_poservices-outl_level = 0.
w_poservices-outl_ind = 'X'.
w_poservices-subpckg_no = w_src-sub_packno. "Sub package no
w_poservices-quantity = w_src-srqty. "Service Quantity
w_poservices-base_uom = w_src-srmeins. "Service Basic unit of Measure
w_poservices-price_unit = '1'.
w_poservices-from_line = '1'.
w_poservices-gr_price = w_src-brtwr. "GR Price
w_poservices-short_text = w_src-sh_text1. "Service Short Text
w_poservices-matl_group = w_src-matkl. "Material Group
APPEND w_poservices TO i_poservices.
CLEAR w_poservices.
PO Service Access values
w_posrvacc-pckg_no = w_src-packno. "Package no
w_posrvacc-line_no = w_src-srv_line_no. "Line item
w_posrvacc-serno_line = w_src-zekkn. "'01'..
IF w_src-vproz IS INITIAL.
w_posrvacc-percentage = '100.0'.
ENDIF.
w_posrvacc-serial_no = w_src-zekkn. "'01'.
w_posrvacc-quantity = w_src-srqty. "Service Quantity
w_posrvacc-net_value = w_src-srqty. "Net value
APPEND w_posrvacc TO i_posrvacc.
CLEAR w_posrvacc.
ENDIF.
***Create a NEW PO
AT END OF ihrez.
Call BAPI
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = w_poheader
poheaderx = w_poheaderx
IMPORTING
exppurchaseorder = gv_ebeln
TABLES
return = i_return
poitem = i_poitem[]
poitemx = i_poitemx[]
poaddrdelivery = i_poaddrdelivery[]
poschedule = i_poschedule[]
poschedulex = i_poschedulex[]
poaccount = i_poaccount[]
poaccountx = i_poaccountx[]
poservices = i_poservices[]
posrvaccessvalues = i_posrvacc[]
extensionin = i_extensionin[].
Commit the Transaction
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Regards,
Deepthi.1. If we get error as "In case of account assignment, please enter acc. assignment data for item" than First cehck whetaher u have authorization to Tcode ME23n or not. In my case, I din't had authorization to Me23n tcode.
2. If we get Error as "Please Mainatain Services or Limits". Please create a Service PO in the following Order.
*& Internal Table Declaration
DATA : i_intern TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE,
i_poitem TYPE STANDARD TABLE OF bapimepoitem,
i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
i_poaddrdelivery TYPE STANDARD TABLE OF bapimepoaddrdelivery,
i_poschedule TYPE STANDARD TABLE OF bapimeposchedule,
i_poschedulex TYPE STANDARD TABLE OF bapimeposchedulx,
i_poaccount TYPE STANDARD TABLE OF bapimepoaccount,
i_poaccountx TYPE STANDARD TABLE OF bapimepoaccountx,
i_poservices TYPE STANDARD TABLE OF bapiesllc,
i_posrvacc TYPE STANDARD TABLE OF bapiesklc,
i_extensionin TYPE STANDARD TABLE OF bapiparex,
i_return TYPE STANDARD TABLE OF bapiret2.
*& Work Area Declaration
DATA:
w_poheader TYPE bapimepoheader,
w_poheaderx TYPE bapimepoheaderx,
w_poitem TYPE bapimepoitem,
w_poitemx TYPE bapimepoitemx,
w_poaddrdelivery TYPE bapimepoaddrdelivery,
w_poschedule TYPE bapimeposchedule,
w_poschedulex TYPE bapimeposchedulx,
w_poaccount TYPE bapimepoaccount,
w_poaccountx TYPE bapimepoaccountx,
w_poservices TYPE bapiesllc,
w_posrvacc TYPE bapiesklc,
w_extensionin TYPE bapiparex,
w_return TYPE bapiret2.
START-OF-SELECTION.
Header Data
w_poheader-comp_code = '5791'. "Company Code
w_poheader-doc_type = 'Z0CM'. "Document type
w_poheader-creat_date = sy-datum. "lv_date. "Creation Date
w_poheader-created_by = sy-uname. "Creator Name
w_poheader-vendor = '0005012343'. "Vendor
w_poheader-pmnttrms = 'Z004'. "Payment Terms
w_poheader-purch_org = 'P000'. "Purchase Organization
w_poheader-pur_group = '001'. "Purchase Group
w_poheader-ref_1 = '004500007671'. "OLD PO
w_poheaderx-comp_code = 'X'. "Company Code
w_poheaderx-doc_type = 'X'. "Document type
w_poheaderx-creat_date = 'X'. "Creation Date
w_poheaderx-created_by = 'X'.
w_poheaderx-vendor = 'X'.
w_poheaderx-pmnttrms = 'X'. "Payment Terms
w_poheaderx-purch_org = 'X'. "Purchase Organization
w_poheaderx-pur_group = 'X'. "Purchase Group
w_poheaderx-ref_1 = 'X'.
Item Data
w_poitem-po_item = '000010'.
w_poitem-short_text = 'Z0CM - Default Appr. Test '.
w_poitem-plant = '5368'.
Trackign no
w_poitem-trackingno = ''.
Material group
w_poitem-matl_group = '119'.
w_poitem-po_unit = 'EA'. "Base Unit of Measure
w_poitem-net_price = '17500.00'. "Net Price
w_poitem-tax_code = 'I0'.
w_poitem-item_cat = '9'.
w_poitem-acctasscat = 'K'.
w_poitem-distrib = space.
Package must be given in item to create Service PO
w_poitem-pckg_no = 0000000001.
APPEND w_poitem TO i_poitem.
CLEAR: w_poitem.
w_poitemx-po_item = '000010'.
w_poitemx-delete_ind = 'X'.
w_poitemx-short_text = 'X'.
w_poitemx-plant = 'X'.
w_poitemx-trackingno = 'X'.
w_poitemx-matl_group = 'X'.
w_poitemx-quantity = 'X'.
w_poitemx-po_unit = 'X'.
w_poitemx-net_price = 'X'.
w_poitemx-tax_code = 'X'.
w_poitemx-item_cat = 'X'.
w_poitemx-acctasscat = 'X'.
w_poitemx-distrib = 'X'.
w_poitemx-pckg_no = 'X'.
APPEND w_poitemx TO i_poitemx.
CLEAR: w_poitemx.
PO Deliery Address
w_poaddrdelivery-po_item = '000010'.
w_poaddrdelivery-addr_no = '0000061208'.
APPEND w_poaddrdelivery TO i_poaddrdelivery.
CLEAR w_poaddrdelivery.
POschedule
w_poschedule-po_item = '000010'..
DATA : LV_DATE TYPE SY-DATUM,
lv_schd.
CLEAR: lv_date.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = '12/2/2009'
IMPORTING
date_internal = lv_date
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF NOT lv_date IS INITIAL.
w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
w_poschedule-delivery_date = lv_date.
w_poschedule-quantity = '1.000'.
APPEND w_poschedule TO i_poschedule.
CLEAR w_poschedule.
lv_schd = 'X'.
ENDIF.
w_poschedulex-po_item = '000010'.
w_poschedulex-del_datcat_ext = 'X'.
w_poschedulex-delivery_date = 'X'.
w_poschedulex-quantity = 'X'.
IF lv_schd = 'X'.
APPEND w_poschedulex TO i_poschedulex.
CLEAR : w_poschedulex,
lv_schd.
ENDIF.
PO Account Assignment
w_poaccount-po_item = '000010'.
w_poaccount-serial_no = '01'.
w_poaccount-distr_perc = ''.
w_poaccount-quantity = '1.000'.
w_poaccount-gl_account = '0000603064'.
w_poaccount-costcenter = '0053680100'.
w_poaccount-asset_no = ''.
w_poaccount-wbs_element = ''.
w_poaccount-network = ''.
w_poaccount-tax_code = 'I0'.
w_poaccount-activity = ''.
APPEND w_poaccount TO i_poaccount.
CLEAR w_poaccount.
w_poaccountx-po_item = '000010'.
w_poaccountx-serial_no = '01'.
w_poaccountx-distr_perc = 'X'.
w_poaccountx-quantity = 'X'.
w_poaccountx-gl_account = 'X'.
w_poaccountx-costcenter = 'X'.
w_poaccountx-wbs_element = 'X'.
w_poaccountx-network = 'X'.
w_poaccountx-tax_code = 'X'.
w_poaccountx-activity = 'X'.
w_poaccountx-cmmt_item = 'X'.
APPEND w_poaccountx TO i_poaccountx.
CLEAR w_poaccountx.
Extension for ZZSub
w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTING'.
w_extensionin-valuepart1+0(5) = '00010'..
w_extensionin-valuepart1+5(2) = '01'.
w_extensionin-valuepart1+28(5) = ''.
APPEND w_extensionin TO i_extensionin.
CLEAR w_extensionin.
w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTINGX'.
w_extensionin-valuepart1+0(5) = '00010'.
w_extensionin-valuepart1+5(2) = '01'.
w_extensionin-valuepart1+11(1) = 'X'.
APPEND w_extensionin TO i_extensionin.
CLEAR w_extensionin.
Extension to add Expense Type only
w_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
w_extensionin-valuepart1+10(4) = '0131'.
APPEND w_extensionin TO i_extensionin.
CLEAR w_extensionin.
w_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
w_extensionin-valuepart1+10(4) = 'X'.
APPEND w_extensionin TO i_extensionin.
CLEAR w_extensionin.
EXPORT i_extensionin[] TO MEMORY ID 'SUB'.
PO Services
PO Services( One Line Iem)
Assign the dummy no as Pacakage no
w_poservices-pckg_no = 0000000001. "(assign package no as a dummy number)
w_poservices-line_no = 0000000001. "Line item
w_poservices-outl_ind = 'X'.
Assign Dummy no as sub package no
w_poservices-subpckg_no = 0000000003. "(Dummy No.) "Sub package no
w_poservices-from_line = '1'.
APPEND w_poservices TO i_poservices.
CLEAR w_poservices.
PO Services(Second Line Item )
Assign the same sub package dummy no which is mentioned above
w_poservices-pckg_no = 0000000003. "(Dummy No.) "Sub package no
w_poservices-line_no = 0000000002.
w_poservices-ext_line = '0000000010'. "External line
w_poservices-quantity = '17500.0'. "Service Quantity
w_poservices-base_uom = 'EA'. "Service Basic unit of Measure
w_poservices-price_unit = '1'.
w_poservices-gr_price = '1'. "GR Price
w_poservices-short_text = 'Z0CM - Default Appr. T'. "Service Short Text
w_poservices-matl_group = '119'. "w_src-matkl. "Material Group
APPEND w_poservices TO i_poservices.
CLEAR w_poservices.
PO Service Access values
w_posrvacc-pckg_no = 0000000003. "w_src-sub_packno. "Sub package no
w_posrvacc-line_no = 0000000002. "w_src-srv_line_no. "Line item
w_posrvacc-serno_line = '01'.
w_posrvacc-percentage = '100.0'.
w_posrvacc-serial_no = '01'.
w_posrvacc-quantity = '17500.0'. "w_src-srqty. "Service Quantity
APPEND w_posrvacc TO i_posrvacc.
CLEAR w_posrvacc.
DATA : gv_ebeln TYPE ebeln.
Call BAPI
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = w_poheader
poheaderx = w_poheaderx
IMPORTING
exppurchaseorder = gv_ebeln
TABLES
return = i_return
poitem = i_poitem[]
poitemx = i_poitemx[]
poaddrdelivery = i_poaddrdelivery[]
poschedule = i_poschedule[]
poschedulex = i_poschedulex[]
poaccount = i_poaccount[]
poaccountx = i_poaccountx[]
poservices = i_poservices[]
posrvaccessvalues = i_posrvacc[]
extensionin = i_extensionin[].
Commit the Transaction
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
WRITE:/5 gv_ebeln COLOR 5.
SKIP 2.
DATA : lv_msg TYPE string.
LOOP AT i_return INTO w_return WHERE type = 'E'.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = w_return-id
lang = 'EN'
no = w_return-number
v1 = w_return-message_v1
v2 = w_return-message_v2
v3 = w_return-message_v3
v4 = w_return-message_v4
IMPORTING
msg = lv_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
WRITE:/10 lv_msg.
ENDLOOP. -
Error while creating Multiple Items Shopping Cart with Asset Assignment
Hi All,
I am creating Shopping Cart with multiple items for different Assets.
Example: I have Two Assets (Asset A with the budget of $1000 and Asset B with the Budget of $1500) in the back end system.
Asset A assigned to Order 102649996 (value - $1000) and Asset B is assigned to Order 102645121 (Value - $1500).
I am trying to create Shopping Cart with Two Items for Asset A and Asset B (which are available in Back End).
I created First item (001) in the Shopping Cart for Asset A and Value $750.
I copied the First Item Details to Second Item (002) and changed the Asset as B and Value $1000.
When I click on Check tab in Shopping Cart Browser, the SRM System is giving the Error Message like
Item 001 Order 102649996 budget exceeded
Item 002 Order 102649996 budget exceeded
I am getting the above error, only when I copy the first item details to the second item while creating Shopping Cart.
Actually the Budget is not exceeded (Asset A Budget is $1000 - First Item and Asset B Budget is $1500 - Second Item) and SRM system is taking the order 102649996 (which is assigned to the Asset A) for the Second Item 002 also.
Kindly let me know the Solution or Please let me know do we have any OSS note to resolve the issue.
Thanks a lot in advance.
Best Regards,
Sudarsan
Edited by: KOYYA SUDARSANA NAIDU on Aug 18, 2008 8:22 PM
Edited by: KOYYA SUDARSANA NAIDU on Aug 19, 2008 6:29 AMHi. It is a "feature" of SRM.
I asked SAP about it and did not get a good response.
If you enter Asset A, it will copy the internal order number from that asset into the cart. You can not see the internal order in the web, but you can see it in BBP_PD.
If you then change the asset to asset B, it will not refresh the internal order number.
This means you get internal order A on asset B.
It happens any time you change asset number, so if you copy a line then change you will get this problem.
We ended up using the BBP_DOC_CHANGE_BADI to RFC into R/3 and update the internal order number.
Regards,
Dave. -
PO item characteristic using BAPI_PO_CREATE1
Dear All,
I am uploading open purchase order using BAPI_PO_CREATE1. everything is working fine. but for Semi-finished products i have to upload Individual length. i.e. in characterstics of purchase order item.
kindly helpHi
Please go through the documentation in SE37 for the FM.. It is very clear on how you need to work on this BAPI. It is given with examples.
Regards,
Vishwa. -
Creating multiple libraries and using an external drive for data
I'm a recent switcher and new to iphoto. On the windows platform, I used adobe album. I have a around 10k of images that I put on an external drive which is attached to my new imac. I deleted the iphoto folder and redirected it to my images on my external. All is working great. I'm looking for some advise on work flow of file/iphoto management. i.e. I'm assuming the more images I accumulate, the slower I photo is going to run? I hear you can create multiple iphoto libraries. Will that only load the photos that are associated with the library and I'm assuming optimize iphoto's performance versus always loading every photo you have taken every time you work in iphoto? If adding libraries is the way to go, can someone direct me to instruction on how to do this?
This may be beyond this threads scope but I plan to put all my data (iphoto, imovies, itunes) onto an external drive in order to keep the imac main drive as clean a possible. Is my thinking correct in doing so. Any negative repercussion in doing so?Joe:
I'm assuming the more images I accumulate, the slower I photo is going to run?
You'll have to get quite a lot of photos into iPhoto before you start to see a real slowdown in performance. Users have reported libraries of 40K files and they perform just fine. However, do not keep all of rolls open as that will really do a job on the performance. Just open the rolls you need and close them all before quitting.
Yes, you can use multiple libraries and only load what's in each. I use iPhoto Library Manager to manage and move quickly between 10 libraries. With the paid version of iPLM you can move albums and/or rolls between libraries as needed and keep the keywords, ratings, and comments intact.
Using an external HD in order to maintain sufficient free space (10G minimum is what I recommend) on the boot drive to help optimize performance is a very good idea.
As far as any negative aspects, it would be a good idea to have a second external HD as a backup to the working external HD. You can't be too careful with those image files (and other important files) that can't be replaced.
Do you Twango?
TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file. -
How to create multiple output files using TrAX?
I am new in this field. I'm trying to create multiple xml output files using TrAX. I have to parse a xml source file and output it to multiple xml files. My problem is that it only creates one output file and puts all the parsed data there. When i use saxon and run xsl and xml files, it works fine and creates multiple files...it has something to do with my java code...Any help is greatly appreciated.
Here's my XSL file
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
<xsl:template match="data_order">
<data_order>
<xsl:copy-of select="contact_address"/>
<xsl:copy-of select="shipping_address"/>
<xsl:apply-templates select="ds"/>
</data_order>
</xsl:template>
<xsl:template match="ds">
<xsl:variable name="file" select="concat('order', position(),'.xml')"/>
<order number="{position()}" href="{$file}"/>
<xsl:document href="{$file}">
<xsl:copy-of select="."/>
</xsl:document>
</xsl:template>
</xsl:stylesheet>
xml source file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE operation SYSTEM 'data_order.dtd'>
<data_order job_id='00-00-000' origin='PM-ESIP'>
<contact_address>
<first_name>ssssss</first_name>
<last_name>sssss></last_name>
<phone>2323232</phone>
<email>dfdfdsaf</email>
</contact_address>
<ds ds_short_name ='mif13tbs'>
<output>
<media_format>neither</media_format>
<media_type>FTP</media_type>
<output_format>GIF</output_format>
</output>
</ds>
<ds ds_short_name ='mif15tbs'>
<output>
<media_format>neither</media_format>
<media_type>FTP</media_type>
<output_format>GIF</output_format>
</output>
</ds>
</data_order>
My java file
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
import java.io.*;
public class FileTransform {
public static void main(String[] args)
throws Exception {
File source = new File(args[0]);
File style = new File(args[1]);
File out = new File(args[2]);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer t = factory.newTransformer(new StreamSource(style));
t.transform(new StreamSource(source), new StreamResult(out));Saxon has specific extensions. In this case it is <xsl:document>. That looks like a standard XSLT element, but it actually isn't. The history behind it is this: There was a proposal to create a new version of XSLT, called XSLT 1.1. One of the new features of this version was to be this xsl:document element. The author of the Saxon product, Michael Kay, is one of the people on the W3C committee directing the evolution of XSLT, so he upgraded his product to implement XSLT 1.1. But then the committee decided to drop XSLT 1.1 as a recommendation. So that left Saxon in the strange position of implementing a non-existent extension to XSLT.
The other outcome of this process was that XSLT (1.0) does not have a way of producing more than one output file from an input file. And so the short answer to your question is "Trax can't do that." However, XSLT 2.0 will be able to do that, although it is not yet a formal W3C recommendation, and when it does become one it will take a while before there are good implementations of it. (I predict that Saxon will be the first good implementation.)
One of the problems with XML and XSLT is that what you knew a year ago is probably obsolete now, because of all the evolution going on. So being new in the field is not a disadvantage, unless you get stung by reading obsolete tutorials or magazine articles. -
Creating multiple user tables using script
hi
my requirement is i want to create multiple tables by running script . is it possible .how do i do that can any one suggest me and send sample code to solve this task.
(i have to create 100 userTables it is very difficult to create using code or from B1 that is my requirement )and i think some good solution is there for my problem and inserting the tables into B1 by running script.Hi Om,
Take a look at the SDK help files, or even better, the examples provided with the SDK, they give you a good example how to create a usertable.
Tried that, you could programm a loop wich creates your usertables, or a function that progresses a input file containing all your usertables.
<b>Pseudo code loop (C#)</b>
for(int i = 1; i <=100; i++)
/* Call you your function that creates a usertable with the given name */
CreateUserTable("TBL_" + i.ToString());
Hope it helps,
Rowdy -
How to create multiple ifs users using XML
I used the following xml file to create a ifs user. But I don't know how to create multiple users using XML. Thanks for your help.
<SimpleUser>
<UserName>bill</UserName>
<Password>bill</Password>
<DirectoryUserDescription>Bill</DirectoryUserDescription>
</SimpleUser>There are many good resources for Powershell tutorials. The MS help page for each cmdlet is usually a good place to start.
The suggested answer is very good and easy to modify to your needs. The linked article provides good detail on creating your csv file. If you look at their sample csv, you will see the column for LicenseAgreement and UsageLocation. You can change the script
to use the values from the csv instead of the same value for every user like so:
-LicenseAssignment $_.LicenseAgreement -UsageLocation $_UsageLocation
Basically, $_.<valuename> is the filled in by the value under the heading <valuename> in your csv file for the current user.
As for what msdivision, replace this with the correct domain name value for your organization. You can get the values for license SKUs from existing users by using the following:
Connect-MsolService
Get-MsolUser -UserPrincipalName <userprincipalname> |select Licenses -
How to create multiple physical channels using DAQmx?
Hi, I am new to Labview.
Can anyone please help me on how to create multiple physical channels? I am following the LabVIEW examples in the NI example finder but they are only for acquiring signals from one channel.
Actually, I am using the channels of an SCXI 1520 to measure voltage signals. And one more thing, in the NI Example Finder, they are sample codes there for setting the filter in SCXI 114x.
Will this example work with an SCXI 1520, too?
Thanks!There are many ways to read multiple channels in LabVIEW. First, if you look at that example that lets you set the filter setting on the 114x and you click on the 'Physical Channel Listbox' then click 'Browse' you can see that you can select multiple channels. After you select the channels and hit 'Ok' it will build a multiple channel string. This is one way to read multiple channels.
Next, you can create a 'Task' in Measurement and Automation Explorer(MAX). When you create this task select all the channels that you need to read then back in LabVIEW simply select a 'DAQmx Task Name Constant' Select the task you just created and wire that to an Input of your first DAQ VI. If you do this you do not need to have a 'DAQmx Create Physical Channel' VI or create
Task because it is already created in MAX.
When looking at example VIs you can tell if a multi-channel read is acceptable by looking at the 'DAQmx Read' and if it says NChan that means it will do a multichannel read. There are tons of example programs that will display the multichannel read capabilities.
This example may not work for the 1520 because the properties that are set could possibly be specific to the 142x. When using the 1520 though it is very likely that the properties will be very similar if not exact. You will simply put a DAQmx Channel property node on your block diagram and then look for the Lowpass filter settings properties that will most likely be in the same location. Now another way todo this without using a property node would be in MAX when you create a task set the filter settings from the Device tab in the task configure window.
Let me know if you need anymore help with reguards to this issue! Have a great day!
Allan S.
National Instrument
s
Applications Engineering -
How to create multiple items in popup window
Hi,
i am using apex3.2.
i want to create page as a popup and that popup page has multiple of select list items .i have 8 select list item on popup page.i have a link on other page.when i click on this link popup page should open .after selecting values from select list when i click on submit button on popup page. all select list return values concatenation should display in a text box item.
How can i do this? if you have any tutorial or link please send me.
Thanks & Regards
VedantHi,
try this example from Denes Kubicek:
http://htmldb.oracle.com/pls/otn/f?p=31517:93:678982863984901: (Close PopUp + Refresh)
Best regards,
Tobias -
Creating multiple-paged documents using Illustrator
Hi all! I normally use InDesign to create many-page projects. But twice now, I've had clients request that I create the file using Illustrator. Am I missing something? Can Illustrator do this? It seems to be each page would have to be its own separate file. That seems cumbersome to me. Thanks.
JulieIn CS 4 & 5 you can can have multiple artboards which are page like regions of the canvas they an be printed like pages.
In previous versions you would tile the art within a larger dimension document.
Bot can be printed or saved to a Multipage pdf. -
Can XSQL create multiple session variables using only one database call?
Right now if I want to set session variables for username and accesslevel, I code out like this:
<xsql:set-session-param name="name" bind-params="username password">
SELECT DISTINCT USERNAME
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-session-param>
<xsql:set-session-param name="authlvl" bind-params="username password">
SELECT DISTINCT ACCESSLEVEL
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-session-param>Is there any way to do it so that I don't have to do multiple queries to the database to set session variables? i.e., something like this:
<xsql:set-multiple-session-param name="user authlvl" bind-params="username password">
SELECT DISTINCT USERNAME,
ACCESSLEVEL
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-multiple-session-param>Sort of like how bind-params works. Setting bind-params="username password" makes the first ? akin to username and the next ? akin to password.
Is this functionality already in existence?
Thanks!
Malik Graves-PryorNot currently possible to collapse into one request without doing it in a custom action handler.
A custom action handler can:
[list=1]
[*]Get the current JDBC connection from the XSQLPageRequest
[*]Get the SQL statement to perform using the function getActionElementContent
[*]Handle any bind parameters specified an a bind-params attribute on the action element by calling handleBindVariables()
[*]Execute and fetch the row from the query
[*]Check to see that the return value of getPageRequest().getRequestType() equals the value "Servlet"
[*]Cast the page request to an XSQLServletPageRequest and call getHttpServletRequest()
[*]Call getSession() on the request
[*]Set the session variables you want to
[*]Close the JDBC statement
[list]
will consider a built-in enhancement for a future XSQL release.
Maybe you are looking for
-
I just bought a new printer for my iMac version 10.7 Lion but I am able to install the software but for some reason I am not able to view the printer under system preferences to add the printer. It is connected with the USB cord!! It as if the printe
-
Create user in sql server 2000??
Hi, I can't believe I can't find any previous posts to do with this subject! After googling around I ended up with this bit of SQLsp_addlogin @loginame='cms',@passwd='cms',@defdb='cms'; USE cms; sp_grantdbaccess @loginame='cms',@name_in_db='cms'; sp_
-
Hello, I just bought a new workstation to optimize my work and the Warp Stabilize Effect take the same time ( 10 minutes) to analyse the background as my old workstation no graphic card inside ( Lenovo i5). Is it normal? 6 Core i7-4930K @ Turbo Boos
-
Can i use oracle 8i for oracle 9ias application server ?
can i use oracle 8i for oracle 9ias application server for developing jsp applicationes? can i run the oracle 8i data application with 9 ias oracle server? can any one give suggetion? pullareddy
-
HI FI GURUS THIS IS MY 1st IMPLEMENTATION PROJ IF ANY ONE HAVE TO BE PROCESS PLS FORWARD IT TO MY MAIL ID [email protected] thanks in advance