** Not able to create Value Mapping Table in Integration Directory
Hi friends,
I am not able to create value mapping entries like below in ID.
Agency : Computer1 Agency : Computer2
Scheme: Country Scheme: CountryCode
Value for Computer1 Value for Computer2
Australia AU
India IN
Austria AU
Note that I have assigned the same country code 'AU' for the Countries 'Australia' & 'Austria'. But, when we assign 'AU' to 'Austria', the system asks question as below:
Value mapping already exists
Australia | AU
Austria | AU
Do you want to delete it from the existing group and assign it to the current group instead?
Continue Cancel
Though choose any of the option, I am not able to assign 'AU' to 'Austria'.
Friends, this is my requirement. How do we solve this ?
Kindly help me.
Kind Regards,
Jeg P.
Hi Koen,
I tried this. Its working fine now. Thanks for giving guidance to me. Then, I have another doubt. Suppose if we create 2 sets of VM table, (First Receiver will act as 2nd one how do we achieve this). For Ex:
Set 1:
Source Agency: SYS1 Target Agency: SYS2
Source Scheme: CODE Scheme : DEPT
A HR
B Accts
C Finance
Set 2:
Source Agency: SYS2 Target Agency: SYS3
Source Scheme: DEPT Scheme : GRADE
HR Second
Accts First
Finance First
In this case, I followed the same logic which you said, but I am not able to create. I think the main point is GUID here. If you have any idea, kindly tell me.
Kind Regards,
Jegathees
Similar Messages
-
Not Able to Create database objects(Tables, etc) in Oracle 12c
Hello Sir,
Recently, I have installed oracle 12c in my PC. And I am able to connect with the ANONYMOUS user and connection name ORCL.
But I am not able to create any objects in database like tables creation, it's just showing the error message like- you don't have sufficient privileges.
Could you please help on this? How to start the work on oracle 12c database as I have worked on Oracle 11g with the SCOTT user and connection name ORCL.It was working fine. But SCOTT user is not present in 12c. Is there any other USER in 12c with the default tables like EMP table in 11g in the SCOTT USER schema?
Please suggest, what to do?
Thanks In Advance!!Hi Nishant ,
Thanks for the reply.
I have done all the steps as you mentioned above. I am not able to create HR user. Please check the below errors and
please guide me on this.
SQL*Plus: Release 12.1.0.1.0 Production on Sat Oct 5 23:46:38 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter user-name: anonymous
Enter password:
Last Successful login time: Sat Oct 05 2013 23:46:58 +05:30
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> connect sys as sysdba;
Enter password:
Connected.
SQL> CREATE USER hr IDENTIFIED BY Password#123
2 DEFAULT TABLESPACE hr_users
3 TEMPORARY TABLESPACE hr_temp
4 QUOTA 5000k ON hr_users
5 QUOTA unlimited ON hr_temp
6 PROFILE enduser ;
CREATE USER hr IDENTIFIED BY Password#123
ERROR at line 1:
ORA-65096: invalid common user or role name
SQL> SELECT NAME, CDB FROM V$DATABASE;
NAME CDB
ORCL YES
SQL> SHO CON_ID CON_NAME
CON_ID
1
CON_NAME
CDB$ROOT
SQL> SET LINE 150
SQL> SELECT NAME, OPEN_MODE, OPEN_TIME FROM V$PDBS;
NAME OPEN_MODE OPEN_TIME
PDB$SEED READ ONLY 04-OCT-13 08.57.50.461 PM
PDBORCL MOUNTED
SQL> CONN HR/HR@PDBORCL
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SQL> SHO CON_ID CON_NAME
SP2-0640: Not connected
SP2-0641: "SHOW CONTAINER" requires connection to server
Thanks in advance!!
Regards,
Dharmendra Verma -
Re: Not Able to Create database objects(Tables, etc) in Oracle 12c
In addition to what Nishant said, the PDB databases are not opened by default.
You must open them manually or create a trigger to do it.Hi Nishant ,
Thanks for the reply.
I have done all the steps as you mentioned above. I am not able to create HR user. Please check the below errors and
please guide me on this.
SQL*Plus: Release 12.1.0.1.0 Production on Sat Oct 5 23:46:38 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter user-name: anonymous
Enter password:
Last Successful login time: Sat Oct 05 2013 23:46:58 +05:30
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> connect sys as sysdba;
Enter password:
Connected.
SQL> CREATE USER hr IDENTIFIED BY Password#123
2 DEFAULT TABLESPACE hr_users
3 TEMPORARY TABLESPACE hr_temp
4 QUOTA 5000k ON hr_users
5 QUOTA unlimited ON hr_temp
6 PROFILE enduser ;
CREATE USER hr IDENTIFIED BY Password#123
ERROR at line 1:
ORA-65096: invalid common user or role name
SQL> SELECT NAME, CDB FROM V$DATABASE;
NAME CDB
ORCL YES
SQL> SHO CON_ID CON_NAME
CON_ID
1
CON_NAME
CDB$ROOT
SQL> SET LINE 150
SQL> SELECT NAME, OPEN_MODE, OPEN_TIME FROM V$PDBS;
NAME OPEN_MODE OPEN_TIME
PDB$SEED READ ONLY 04-OCT-13 08.57.50.461 PM
PDBORCL MOUNTED
SQL> CONN HR/HR@PDBORCL
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SQL> SHO CON_ID CON_NAME
SP2-0640: Not connected
SP2-0641: "SHOW CONTAINER" requires connection to server
Thanks in advance!!
Regards,
Dharmendra Verma -
How create a Value Mapping Table in XI 3.0?
Hi:
I wish make a single sample scenario where receiving data must be converted according to convertion table:
01 -
Legacy A | Legacy B -
M
Male: 01 | M
Female: 02 | F
And I don´t know how build it. Must I create anything in Integration Repository? (any special message mapping or function?).
Anyone know about weblog where explain step by step for "value mapping group" and "value mapping tables" creation?
Help me please.
Regards!!
David.Hi David,
You can create value mapping tables in Integration Directory.
First you have to create Value mapping group using menu Object>new>Value mapping Group
to Display value mapping you have to use Tools--> Value mapping.
Also refer to following link on help.sap.com
http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/content.htm
In IR Graphical mapping tool, use the standard function Conversions-->Value mapping.
Hope this helps.
Rgds,
Sam Raju
Message was edited by: Sam Raju
Message was edited by: Sam Raju -
How can i access value mapping table using xslt mapping
Hi All,
I have maintained value mapping table in integration directory.I want to access the data from the value mapping table in XSLT mapping using java function.PLease suggest me to do this.
Thanks
Pullarao.Value mapping that thread should solve your query !!!
-
Mass data update in Value mapping table
Hi ,
I have used Value mapping replication to update the mass data from external source to Value mapping table . Its updatating in Runtime Cache but i want the data to be visible in GUI Value mapping table as well. Is it possible ? Because i doubt that the data in Runtime Cache may get removed if the system restarts . Can any one help ?
Thanks
LaksHi NALLAM GUNA RANJAN,
Thanks for your prompt reply but i didn't get what you are trying to convey . My issue here is
Instead of manually entering key-value pair in Value mapping table , I used Value mapping replication ( http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/frameset.htm )
Its updating the data in Runtime Cache ( you can see this using Cache Monitoring ) but not able to view the data in Actual Value mapping Table (GUI in Directory of SAPXI) I want the data updated using Replication to be visible in GUI table is it possible ?
Hope you got the question much better now
Thanks
Laks -
Create multiple idoc with multiple receivers based on value mapping table
Hi,
Scenario:
Step1 : sender sends a finance doc iin the form of an idoc. This idoc will have multiple line items based on profit center. Do determine the value of receiving comp code(header field) n receiving system(logical sys name) value mapping table has to be used.
Solution so far: I can put an rfc lookup for fetching receiving comp code from mapping table with i/p paraameter as profit center . And split the incoming idoc based on comp code value by using split by value. Now I need your advise 2 take this further.
Issue 1 : say the incoming idoc has 4 line seg wid 4 diff profit center
Profit center. Rec comp code. Recv sys
P1. C1. R1
P2. C2. R1
PS. C2. R1
P3. C3. R2
Nw using this info, I want 3 diff idocs to be created for each unique comp code.
Idoc 1 : for C1 wid one line item + 1 for reconsilation ( to be generated additionally)
Idoc2 : for C2 wid 2 line items + 1 for reconsilation
Idoc 3: for C3 wid 1 line item + 1 for reconsilation
Idoc 1 and idoc 2 shud be sent to R1.
Idoc 3 shud be sent to R2.
Kindly advise on thisHi experts,
U all r pretty close, but let me put this more clearly.
Step1: create multiple idocs based on unique comp code - I'm able to do this using rfc lookup n split by value. So I get 3 idocs each for c1, c2 n c3.
Nw as per the values from value mapping table.
Idoc for c1 contains 1 line seg.
Idoc for c2 contains 2 line segs.
N idoc for c3 contains 1 line seg.
steps2 n 3, where I do not have a confirmed solution yet n need ur advise.
Step 2 : for each idoc generated I need 2 create n additional segment, mapping 4 which will be based on the values in the original segments for that idoc.
In d above scenario, idoc for c1 contains 1 line seg, nw I want 2 add one more seg to it. The amount and pisting key values in this segment wud be calculated based on the values of the amount and posting key belonging to the original segment in this idoc.
Similarly for idoc for c2 there are 2 segs, nw I need one more, means 3 in allm
Hence for idoc for c3, 1 orig already present + 1 more. = total 2.
Nw I need ur advise on how 2 generate this additional seg in each idocm
Step 3: when all dese 3 idocs are generated, ( in this case itz 3, in real time it can be n), I need to find their respective receivers using rfc lookup n then based on the receiver send 2 resp recvng systm
Nw how do I do this?
Please explain with examples if possible 4 bettr understanding.
u2020ђąu03B7kўu03C3u03C5 in advance. -
Not able to create new entry in RSADMIN Table
Hi All,
I am going thru the OSS note 1275837 (Note 1275837 - PrecServer: process based load distribution (ABAP part)), as it recommends
add the entry "BWPREC_USE_NEW_LOAD" with value "X" in table "RSADMIN"
When I check in SE11 and SE16 there is no option to create button for above entry in table RSADMIN.
Please advise for any help to create above entry.
Thanks
Ganesh Reddy.
Edited by: Ganesh Reddy on Jan 11, 2010 4:20 PM
I got access key from our basis team. But still not able to create new entry as mentioned in OSS note. Any further help....
Thanks
Ganesh Reddy.
Edited by: Ganesh Reddy on Jan 11, 2010 9:13 PMHi
Goto SM30 - Table Maintanance Generator and enter the table name and click on button maintain ,it will show the error message
"The maintenance dialog for RSADMIN is incomplete or not defined" because the table maintenance is not allowed manually.
First Option
When you double click the error message a performance assistant screen will open in that you can see Procedure
"Generate the required maintenance dialog" click on that and try to maintain the table using Access Key, as i dont have access key i have not tried this option.
Second Option
You can write an SE38 program with an insert statement.
TABLES rsadmin.
DATA: wa TYPE rsadmin.
wa-object = 'object name'.
wa-value = 'X'.
INSERT into rsadmin values wa.
Thanks -
In the Value Mapping Table n:1 relations is not allowed???
I'm using Value Mapping but if I try to fill the Value Mapping Table with 2 different source values (e.g AA, BB) and the same one as target (e.g. ZZ) the Integration Builder does not allow it.
I receive the message:
"Rappresentation already exists.
BB | ZZ
AA | ZZ
Do you want to delete it from the existing group and assign it to the current group instead?
Any idea?
Sergio
Message was edited by: Sergio FerrariHi Sergio,
I think it does allow you to have n:1 relations. The error you are getting is because the mapping already exists in another group. You can try to display it to see which group the mapping belongs to.
Nevertheless, since it exists, you do not to enter it again. You are able to use it in your mapping program anyway.
Regards,
Hart -
Not Able to create ADF Table In the Multiple model enviorment
Hi All
I am not able to create ADF Table or ADF Read-only Table
I am having following thinks in my JWS Project
2, Model Project(Different different name)
2,faces-config.xml(Different different name)
1 web Project (View Controller)
and one Databinding.cpx file
i am using following version of jdeveloper to develop application
ADF Business Components 10.1.3.41.57
BPEL Designer 10.1.3.3.0 (Build 070615.0525)
Java(TM) Platform 1.5.0_06
Oracle IDE 10.1.3.41.57
Struts Modeler Version 10.1.3.41.57
UML Modelers Version 10.1.3.41.57
Versioning Support 10.1.3.41.57Are you dragging from the data control? what technologies did you use for the data controls?Ans:I am using data controll as ADF BC
Are the two faces-config.xml files in your web project?
Ans:Yes with one name with faces-config.xml and antoher with different name -
Hi All,
I have implemented the Out of Box solution of Order Management Analytics module with 11.5.10 version of Oracle EBS and respective adopters. Under the same I am not able to notice any mapping to load the data into W_CUSTOMER_STATUS_HIST_F_TMP table and due to which it causing few reports under order management.
Could you please tell me the mappings name for this Target Table so that I can verify from my side if it has been missed or so?
I am finding this W_CUSTOMER_STATUS_HIST_F_TMP table is getting used as Source Table under the folder of PLP for the mapping as,
PLP_CustomerStatusHistoryFact_Extract
PLP_CustomerStatusHistoryFact_Old_Customers_Load
and PLP_CustomerStatusHistoryFact_Extract
Thanks,
-VinayNot sure this would help but As per data lineage guide, it says PLP_CustomerStatusHistoryFact_Extract mapping populates this table from series of different tables. Later, From temp table it goes to W_CUSTOMER_STATUS_HIST_F table via mapping PLP_CustomerStatusHistoryFact_New_Customers_Load
~r -
Not able to set values in drop down for a table field
Hi All,
I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.
Pls help.
Regards,
BhaskarHi Otto,
Here is the code I am using:
* navigate from <CONTEXT> to <DATASOURCE> via lead selection
lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).
* navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).
* navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).
node_info = lo_nd_education_tab->get_node_info( ).
REFRESH ddlb_value_set.
DATA: wa_edu_est TYPE t517t.
SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
s_element-text = wa_edu_est-stext.
s_element-value = wa_edu_est-slart.
APPEND s_element TO ddlb_value_set.
ENDSELECT.
SORT ddlb_value_set BY text.
* Set Value_sets to node_info
node_info->set_attribute_value_set(
name = 'EDU_EST'
value_set = ddlb_value_set ).
Regards,
Bhaskar -
Import conversion data table from SAP R/3 into value mapping table in XI
Hi:
Somebody knows how to import a table with conversion data that are in SAP R/3 and to take it to a value mapping table in XI?
The purpose is to use a mapping table that can change in the future. Must I use a ABAP programming that retrieve data and build the value mapping table?
If so, how I specify in the ABAP programming the group id, the scheme, the agency and the corresponding value?
Please, help me.
Regards!!!Hi David,
please refer to this section in the help: http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
There is an interface for mass replication of mapping data. The steps you need to carry out to use this are:
+Activities
To implement a value-mapping replication scenario, proceed as follows:
1. Register the Java (inbound) proxies.
To do so, call the following URLs in the following order in your Internet browser:
¡ http://:/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplication&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplication&method=valueMappingReplication (for the asynchronous replication scenario)
¡ http://:/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplicationSynchronous&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplicationSynchronous&method=valueMappingReplicationSynchronous (for the synchronous replication scenario)
You only need to perform this step once (for each installation).
2. Application programming
The ABAP program must perform the following tasks:
¡ Read the value mapping data from the external table
¡ Call the outbound proxy used to transfer the data to a message, which is then sent to the Integration Server
3. Configuration of the replication scenario in the Integration Directory
This involves creating all the configuration objects you need to execute the scenario successfully. One special aspect of the value-mapping replication scenario is that the receiver is predefined (it must be on the Integration Server). The sender, however, is not predefined in the replication scenario and can be defined to meet your individual requirements.
For example, you can use the shipped ABAP proxies.
In the case of the receiver communication channel, choose the adapter type XI. Ensure that you configure a channel for the Java proxy receiver in this case.
Enter the path prefix /MessagingSystem/receive/JPR/XI for this purpose.
+
Regards
Christine -
Not able to create sales order using BAPI - BAPI_SALESORDER_CREATEFROMDAT2
Hi Experts,
I am not able to create sales order . I am using BAPI - BAPI_SALESORDER_CREATEFROMDAT2
to create sales order .I am passing external sales order number to the parameter
SALESDOCUMENTIN.
I am getting following error.
"524 |Only quantity 1 EA is allowed (Item 00001"
Here EA is UOM(Unit of measurement).
Below is the sample program through which i am trying to create the sales order.
*& Report ZSDC_SALES_TEST
report zsdc_sales_test.
*DATA: wa_bapi_header TYPE bapisdhd1.
Include Name - ZSDC_SALES_ORD_UPLOAD_TOP
Program Name - ZSDC_SALES_ORD_UPLOAD_1393
Program Title - Include for Data Declaration and selection screen
Created by - Lalitha W
Created on - 18-Nov-2008
Object ID - SD_C_1393_SALES_ORDER_UPLOAD
Request Id - SD3K905579
Description - This is a common INCLUDE for data declarations and
*selection screen details.
HISTORY
Date |Developer |Req by | Description |Reference ID
| | | |
| | | |
TYPE-POOLS
*TYPE-POOLS: truxs, abap, slis.
TABLES
*TABLES: t100.
TYPES
types:begin of ty_header,
auart(4) type c, " Sales Order Type
vkorg(4) type c, " Sales Organization
vtweg(2) type c, " Distrubution Channel
spart(2) type c, " Division
kunnr_1(10) type c, " Sold to Party
kunnr_2(10) type c, " Ship to Party
augru(3) type c, " Order Reason
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
ketdat(10) type c, " Required Delivery Date
zterm(4) type c, " Payment Terms
inco1(3) type c, " Inco Terms -1
inco2(28) type c, " Inco Terms -2
prsdt(10) type c, " pricing date
waerk(5) type c, " Document Currency
vkbur(4) type c, " Sales Office
vkgrp(3) type c, " Sales group
pltyp(2) type c, " Price List type
kdgrp(2) type c, " Customer Group
bstkd_e(35) type c, " Ship-to-party PO number
submi(10) type c, " Collective Number
bname(35) type c, " Name
ihrez(12) type c, " Your Reference
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
partner_1(25) TYPE c, " Partner(Bill To Party Number)
partner_2(25) TYPE c, " Partner(Payer Number)
partner_3(25) TYPE c, " Partner(Sales Responsible Number)
partner_4(25) TYPE c, " Partner(Order admin)
partner_5(25) TYPE c, " Partner(Contact person)
partner_1(10) type c, " Partner(Bill To Party Number)
partner_2(10) type c, " Partner(Payer Number)
partner_3(10) type c, " Partner(Sales Responsible Number)
partner_4(10) type c, " Partner(Order admin)
partner_5(10) type c, " Partner(Contact person)
tdspras_1(2) type c,
text_1(500) type c, " Text Before Items Z012
tdspras_2(2) type c,
text_2(500) type c, " Invocie Up Z034
tdspras_3(2) type c,
text_3(500) type c, " Invocie Down Z035
tdspras_4(2) type c,
text_4(500) type c, " Customer Reference Continue Z018
tdspras_5(2) type c,
text_5(500) type c, " Dispatch Marks/ Order Z019
tdspras_6(2) type c,
text_6(500) type c, " Ordered By Z003
tdspras_7(2) type c,
text_7(500) type c, " Sales Parameters Z002
kvgr1(3) type c, " Industry
kvgr2(3) type c, " customer BU
end of ty_header.
types: begin of ty_item,
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
bstkd_e(35) type c, " Ship-to-party PO number
posnr(6) type c, " POSTION NUMBER
matnr(18) type c, " Material Number
kwmeng(18) type c, " Order Quantity
pstyv(4) type c, " Sales doc. item categ
kursk(18) type c, " EXCHANGE RATE****
ffprf(8) type c, " DIP PROFILE
werks(4) type c, " Delivering Plant
vstel(4) type c, " SHIPPING POINT
lgort(4) type c, " STORAGE LOCATION
route(6) type c, " Route
kurrf(18) type c, " EXCHANGE RATE-FI
ntgew(18) type c, " Net Weight
brgew(18) type c, " Gross Weight
gewei(3) type c, " Weight Unit
prctr(10) type c, " profit center
abgrs(6) type c, " RESULT ANALYSIS KEY
kalsm_k(4) type c, " COSTING SHEET
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
text_1(500) type c, " material Text 0001
tdspras_1(1) type c,
text_2(500) type c, " Pr Text 9001
tdspras_2(1) type c,
end of ty_item.
types: begin of ty_schedule_line,
bstkd(35) type c, "PO number
bstdk(10) type c, "PO date
bstkd_e(35) type c, "Ship-to-party PO number
posnr(6) type c, "sales doc.Item
etdat(10) type c, "Schedule line date
wmeng(2) type c, "Order Quantity
end of ty_schedule_line.
types: begin of ty_err ,
auart(4) type c, " Sales Order Type
vkorg(4) type c, " Sales Organization
vtweg(2) type c, " Distrubution Channel
spart(2) type c, " Division
kunnr_1(10) type c, " Sold to Party
kunnr_2(10) type c, " Ship to Party
augru(3) type c, " Order Reason
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
ketdat(10) type c, " Required Delivery Date
zterm(4) type c, " Payment Terms
inco1(3) type c, " Inco Terms -1
inco2(28) type c, " Inco Terms -2
prsdt(10) type c, " pricing date
waerk(5) type c, " Document Currency
vkbur(2) type c, " Sales Office
vkgrp(3) type c, " Sales group
pltyp(2) type c, " Price List type
kdgrp(2) type c, " Customer Group
bstkd_e(35) type c, " Ship-to-party PO number
submi(10) type c, " Collective Number
bname(35) type c, " Name
ihrez(12) type c, " Your Reference
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
partner_1(25) type c, " Partner(Bill To Party Number)
partner_2(25) type c, " Partner(Payer Number)
partner_3(25) type c, " Partner(Sales Responsible Number)
partner_4(25) type c, " Partner(Order admin)
partner_5(25) type c, " Partner(Contact person)
tdspras_1(2) type c,
text_1(500) type c, " Text Before Items Z012
tdspras_2(2) type c,
text_2(500) type c, " Invocie Up Z034
tdspras_3(2) type c,
text_3(500) type c, " Invocie Down Z035
tdspras_4(2) type c,
text_4(500) type c, " Customer Reference Continue Z018
tdspras_5(2) type c,
text_5(500) type c, " Dispatch Marks/ Order Z019
tdspras_6(2) type c,
text_6(500) type c, " Ordered By Z003
tdspras_7(2) type c,
text_7(500) type c, " Sales Parameters Z002
kvgr1(3) type c, " Industry
kvgr2(3) type c, " customer BU
message(600) type c,
end of ty_err.
types: begin of ty_t685a,
kschl type kschl,
krech type krech,
end of ty_t685a.
INTERNAL TABLES
***header
data: g_krech_1(4) type c, " Calculation type for condition
g_krech_2(4) type c, " Calculation type for condition
g_krech_3(4) type c. " Calculation type for condition
g_krech_4(4) TYPE c, " Calculation type for condition
g_krech_5(4) TYPE c, " Calculation type for condition
g_krech_6(4) TYPE c, " Calculation type for condition
g_krech_7(4) TYPE c, " Calculation type for condition
g_krech_8(4) TYPE c, " Calculation type for condition
g_krech_9(4) TYPE c, " Calculation type for condition
g_krech_10(4) TYPE c, " Calculation type for condition
g_krech_11(4) TYPE c, " Calculation type for condition
g_krech_12(4) TYPE c, " Calculation type for condition
g_krech_13(4) TYPE c, " Calculation type for condition
g_krech_14(4) TYPE c, " Calculation type for condition
g_krech_15(4) TYPE c, " Calculation type for condition
g_krech_16(4) TYPE c, " Calculation type for condition
g_krech_17(4) TYPE c, " Calculation type for condition
g_krech_18(4) TYPE c, " Calculation type for condition
g_krech_19(4) TYPE c, " Calculation type for condition
g_krech_20(4) TYPE c. " Calculation type for condition
Items
data: g_krech_item_1(4) type c, " Calculation type for condition
g_krech_item_2(4) type c, " Calculation type for condition
g_krech_item_3(4) type c. " Calculation type for condition
g_krech_item_4(4) TYPE c, " Calculation type for condition
g_krech_item_5(4) TYPE c, " Calculation type for condition
g_krech_item_6(4) TYPE c, " Calculation type for condition
g_krech_item_7(4) TYPE c, " Calculation type for condition
g_krech_item_8(4) TYPE c, " Calculation type for condition
g_krech_item_9(4) TYPE c, " Calculation type for condition
g_krech_item_10(4) TYPE c, " Calculation type for condition
g_krech_item_11(4) TYPE c, " Calculation type for condition
g_krech_item_12(4) TYPE c, " Calculation type for condition
g_krech_item_13(4) TYPE c, " Calculation type for condition
g_krech_item_14(4) TYPE c, " Calculation type for condition
g_krech_item_15(4) TYPE c, " Calculation type for condition
g_krech_item_16(4) TYPE c. " Calculation type for condition
data: it_t685a type standard table of ty_t685a.
data: wa_bapi_header type bapisdhd1,
wa_bapi_headerx TYPE bapisdhd1x,
it_bapi_item type table of bapisditm,
it_bapi_itemx TYPE TABLE OF bapisditmx,
it_bapi_cond type table of bapicond,
it_bapi_condx TYPE TABLE OF bapicondx,
it_bapi_partner type table of bapiparnr,
it_bapi_shdl type table of bapischdl,
it_bapi_shdlx TYPE TABLE OF bapischdlx,
it_bapi_order_text type TABLE OF BAPISDTEXT,
it_bapireturn type table of bapiret2.
data: wa_bapi_item like line of it_bapi_item,
wa_bapi_itemx LIKE LINE OF it_bapi_itemx,
wa_bapi_cond like line of it_bapi_cond,
wa_bapi_condx LIKE LINE OF it_bapi_condx,
wa_bapi_partner like line of it_bapi_partner,
wa_bapi_shdl like line of it_bapi_shdl,
wa_bapi_shdlx LIKE LINE OF it_bapi_shdlx,
wa_bapi_order_text like LINE OF it_bapi_order_text,
wa_bapireturn like line of it_bapireturn.
*DATA: zmode(1) VALUE 'N'.
data: it_header type standard table of ty_header.
*DATA: it_temp_header TYPE STANDARD TABLE OF ty_header.
data: it_item type standard table of ty_item.
*DATA: it_temp_item TYPE STANDARD TABLE OF ty_item.
data: it_err type standard table of ty_err.
data: it_fline1 type standard table of tline,
wa_fline1 type tline.
data: it_thead1 type thead.
data: it_fline2 type standard table of tline,
wa_fline2 type tline.
data: it_thead2 type thead.
data: it_fline3 type standard table of tline,
wa_fline3 type tline.
data: it_thead3 type thead.
data: it_fline4 type standard table of tline,
wa_fline4 type tline.
data: it_thead4 type thead.
data: it_fline5 type standard table of tline,
wa_fline5 type tline.
data: it_thead5 type thead.
data: wa_header like line of it_header,
wa_item like line of it_item,
wa_err type ty_err,
wa_bill LIKE LINE OF it_bill,
wa_bill1 LIKE LINE OF it_bill,
wa_iterr like line of it_err,
wa_t685a like line of it_t685a.
wa_bill_item TYPE ty_bill_item.
data: it_schedule_line type standard table of ty_schedule_line,
wa_schedule_line type ty_schedule_line.
data: sales_order_no type bapivbeln-vbeln.
data: ext_sales_order_no type bapivbeln-vbeln.
Variable to be used to separate the fields which are concatenated by a
runtime character
*DATA: g_tabchar(1) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
*DATA: wa_truxs_t_text_data TYPE truxs_t_text_data.
*DATA: g_filename TYPE string,
g_path TYPE string,
g_fullpath TYPE string,
g_user_action TYPE i,
g_file_encoding TYPE abap_encoding.
*DATA : g_text(8192),
data : g_mstring1(100) type c,
g_mstring2(100) type c,
g_mstring3(100) type c,
g_mstring4(100) type c,
g_mstring5(100) type c.
data: g_count1 type ebelp,
g_str_count1(6) type c.
data: g_count type ebelp,
g_str_count(6) type c.
*DATA: f_subrc LIKE sy-subrc,
f_subrc1 LIKE sy-subrc,
f_error(500) TYPE c,
item1(27) TYPE c,
item2(27) TYPE c,
item3(27) TYPE c,
item4(27) TYPE c,
i TYPE ekpo-ebelp.
*DATA: g_billplan_header TYPE c,
g_billplan_item TYPE c.
data : g_external_so type vbak-vbeln. "SO
SELECTION-SCREEN
selection-screen begin of block frame1 with frame title text-001 .
parameters:p_file1 type rlgrap-filename, "OBLIGATORY, "Header data.
p_file2 type rlgrap-filename, "OBLIGATORY, "Item Data.
p_file3 type rlgrap-filename, "Schedule line.
p_file4 type rlgrap-filename ."OBLIGATORY. "Error file.
selection-screen end of block frame1.
start-of-selection.
wa_bapi_header-doc_type = 'Z0MX'. "order type
wa_bapi_header-sales_org = '0130'."sales org
wa_bapi_header-distr_chan = '13'. "distr channel
wa_bapi_header-division = '13'. "division
Old code from copied program
wa_bapi_header-purch_no_s = wa_header-kunnr_2. " Ship to party
New code as required in Finland project
We are using to Header ->Order Tab -> Ship to Party -> Purchase order no (BSTKD_E) to store Old legacy SO number
wa_bapi_header-purch_no_s = 'MX100443'. "External SO i.e Old legacey SO number
wa_bapi_header-ref_1_s = '0000666666'. "Sold to party
wa_bapi_header-ord_reason = wa_header-augru.
wa_bapi_header-purch_no_c = 'ddr1234'. " PO number
wa_bapi_header-purch_date = sy-datum. " PO date
wa_bapi_header-req_date_h = sy-datum. " Required Delivery Date
wa_bapi_header-pmnttrms = '01'. " Payment Terms
wa_bapi_header-incoterms1 = wa_header-inco1.
wa_bapi_header-incoterms2 = wa_header-inco2.
wa_bapi_header-price_date = wa_header-prsdt. " Pricing date
wa_bapi_header-currency = wa_header-waerk. " Document Currency
wa_bapi_header-sales_grp = wa_header-vkgrp. " Sales group
wa_bapi_header-price_list = wa_header-pltyp. " Price list type
wa_bapi_header-cust_group = wa_header-kdgrp. " Cust Group
wa_bapi_header-ship_type = wa_header-vsart. " Shipping Type
wa_bapi_header-purch_no_s = wa_header-bstkd_e. " Ship-to-party po number
wa_bapi_header-collect_no = wa_header-submi. " Collective No.
wa_bapi_header-name = wa_header-bname. " Name
wa_bapi_header-ref_1 = wa_header-ihrez. " Your Reference
wa_bapi_header-cust_grp1 = wa_header-kvgr1. " Industry
wa_bapi_header-cust_grp2 = wa_header-kvgr2. " Customer BU
*ENDFORM. " f_header
IF wa_header-partner_1 IS NOT INITIAL.
wa_bapi_partner-partn_role = 'AG'.
wa_bapi_partner-partn_numb = '0000666666'.
wa_bapi_partner-itm_number = '000000'.
append wa_bapi_partner to it_bapi_partner.
clear wa_bapi_partner.
ENDIF.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_header-partner_2
importing
output = wa_header-partner_2.
IF wa_header-partner_2 IS NOT INITIAL.
wa_bapi_partner-partn_role = 'WE'.
wa_bapi_partner-partn_numb = '0000666666'.
wa_bapi_partner-itm_number = '000000'.
append wa_bapi_partner to it_bapi_partner.
clear wa_bapi_partner.
ENDIF.
perform f_item.
data : order_items_inx type table of bapisditmx with header line.
order_items_inx-material = 'X'. "
order_items_inx-target_qty = 'X'. "
order_items_inx-comp_quant = 'X'. "
order_items_inx-trgqty_den = 'X'.
order_items_inx-rnddlv_qty = 'X'.
order_items_inx-updateflag = 'I'.
order_items_inx-target_qu = 'X'.
order_items_inx-plant = 'X'. "
append order_items_inx.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
salesdocumentin = 'MX11111152'
order_header_in = wa_bapi_header
order_header_inx = wa_bapi_headerx
importing
salesdocument = sales_order_no
tables
return = it_bapireturn
order_items_in = it_bapi_item
order_items_inx = order_items_inx
order_partners = it_bapi_partner
order_conditions_in = it_bapi_cond.
if sy-subrc is initial.
commit work.
endif.
*& Form f_item
text
form f_item .
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_item-posnr
importing
output = wa_item-posnr.
wa_item-posnr = '000010'.
IF sy-subrc EQ 0. "IS INITIAL.
move wa_item-posnr to g_str_count."commented out by shakti
ENDIF.
wa_bapi_item-itm_number = wa_item-posnr. " Line item
WA_BAPI_ITEM-PO_ITM_NO = WA_ITEM-EBELP.
wa_bapi_item-division = wa_item-spart.
wa_bapi_item-purch_no_c = 'ddr1234'. " po number
wa_bapi_item-purch_date = sy-datum. " po date
wa_bapi_item-purch_no_s = 'MX11111112'. " Ship-to-party po number
wa_item-matnr = 'MAXIMO_SERVICE'.
call function 'CONVERSION_EXIT_MATN1_INPUT'
exporting
input = wa_item-matnr
importing
output = wa_item-matnr
exceptions
length_error = 1
others = 2.
if sy-subrc is initial.
wa_bapi_item-material = wa_item-matnr. "material
endif.
wa_bapi_item-target_qty = '1'. " Order qty
wa_bapi_item-comp_quant = '1'.
wa_bapi_item-target_qu = 'EA'.
wa_bapi_item-fixed_quan = '1'.
wa_bapi_item-comp_quant = wa_item-kwmeng.
wa_bapi_item-trgqty_den = '1'.
wa_bapi_item-rnddlv_qty = wa_item-kwmeng.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_item-ps_psp_pnr
IMPORTING
output = wa_item-ps_psp_pnr.
IF sy-subrc = 0.
wa_bapi_item-wbs_elem = wa_item-ps_psp_pnr.
ENDIF.
wa_bapi_item-item_categ = 'ZMAX'.
wa_bapi_item-ex_rate_fi = wa_item-kurrf.
wa_bapi_item-dli_profil = wa_item-ffprf. " Dynamic item processor profile
wa_bapi_item-route = wa_item-route. " route
wa_bapi_item-exchg_rate = wa_item-kursk.
wa_bapi_item-plant = '2090'. " Plant
wa_bapi_item-ship_point = 'FN11'. " Shipping point
wa_bapi_item-store_loc = wa_item-lgort. " stg loc
REPLACE ALL OCCURRENCES OF ',' IN wa_item-ntgew WITH '.'.
REPLACE ALL OCCURRENCES OF ',' IN wa_item-brgew WITH '.'.
wa_bapi_item-net_weight = wa_item-ntgew. "
wa_bapi_item-gross_wght = wa_item-brgew. "
call function 'CONVERSION_EXIT_CUNIT_INPUT'
exporting
input = wa_item-gewei
language = sy-langu
importing
output = wa_item-gewei.
EXCEPTIONS
unit_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
wa_bapi_item-untof_wght = 'KG'. " weight unit
replace all occurrences of ',' in wa_item-kursk with '.'.
replace all occurrences of ',' in wa_item-kurrf with '.'.
wa_bapi_item-profit_ctr = wa_item-prctr. " Profit center
wa_bapi_item-resanalkey = wa_item-abgrs. " RESULT ANALYSIS KEY
wa_bapi_item-cstg_sheet = wa_item-kalsm_k. " COSTING SHEET
append wa_bapi_item to it_bapi_item.
endform. " f_item
Thanks & regards,
Chetansee the following to create sales order:-
*& Report ZSALESORDER
*&DEVELOPED BY JANI KRUPA 4.10.2008
REPORT ZSALESORDER.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d .
SELECTION-SCREEN END OF LINE.
Complete Deliver
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
DATA: lt_schedules_ink TYPE STANDARD TABLE OF bapisdhead1
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
v_text10 = 'Complete delivery'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
*Complete delivery
header-COMPL_DLV = p_autlf.
header-COMPL_DLV = 'X'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
item category
itemx-ITEM_CATEG = 'X'.
APPEND item.
APPEND itemx.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000020'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Fill schedule lines
lt_schedules_in-itm_number = '000020'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000020'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF. -
Not able to create a parameter of type STRING_TABLE in BOR
Hi All,
I want to send a table of type STRING_TABLE from webdynpro to workflow.
I have created this table of type STRING_TABLE in webdynpro as well as in workflow successfully.
But i am not able to create a parameter of type STRING_TABLE in BOR event as well as method.
It is giving me error as "Data type STRING_TABLE can not be used".
So how can i send my internal table value of STRING_TABLE type into workflow?
Regards,
AmarHi,
I agree Vinoth in certain aspects. It is not possibly the best idea to try to store a string table in workflow container. There are certain limitations in the container (255 characters) in certain situations and you might find yourself in problems in the future. So, consider converting the string data into some other format - OR you could also check if you can limit somehow the lenght in WDA (but of course then you will still have the same problem about the string table data type).
If you want to try to it, you should be able to create your own table type of string. I don't remember the details but there might be something "special" about the STRING_TABLE (only available in WDA or whatever), and that's why you are seeing the error. So, try to create your own table type that has string data type as an row. Then use that.
But as I said, you might see some problems. For example, if you try to read the container with SAP_WAPI_READ_CONTAINER, it will just return you the first 255 characters of each row, etc. There are ways to overcome these kind of problems, but just to let you know, they might not be that simple.
Regards,
Karri
Maybe you are looking for
-
Hello, I'm currently in upgrading a SAP R/3 4.7 system to a SAP ECC 6.0 EHP4. Therefore I followed the Upgrade Guide from marketplace - installation- and upgrade guides - SAP ERP - SAP ERP 6.0 - SAP Enhancement Package 4 for SAP ERP 6.0 - Upgrade Gui
-
Adobe InDesign CS6 has stopped working
Activated Creative Cloud membership a few days ago. Installed Indesign first and it worked fine. Installed all the rest of the applications and now InDesign no longer works. It starts up and goes through all of the initialization and then right after
-
Keychain problem and "Set date and time automatically"
Something very strange appened to me today. I spent a few hours to get it through. All starts when I decided to open System Preferences and *set date and time manually* (I lost date and time because I left my PowerBook without its battery for an hour
-
Experiencing issues sending/receiving MMS messages after updating to iOS 6
I, like so many others, have been experiencing problems sending/receiving MMS messages after updating to iOS 6. Other than that, I really do like the new update. I have an iPhone 4S with Verizon. I have been to Verizon, and the issue is not with m
-
I've seen similar questions asked, but I haven't seen the answer I'm looking for. So sorry if this is a repeat. I have my firewall setting to "Allow Only Essential" and Stealth Mode, but this prevents Video Chatting on iChat. I switched it to "Set Ac