Bapi problem - again
Sorry to all of you with probably the same problem but i can't find solution.
Anyway i'm trying to write simple WD which will make in target system user.
I'm using BAPI_CREATE_USER FM.
I did everything like in ohter examples of consuming transaction FM (BAPi).
Anyway will post some code so maybe you will finde some bugs.
I made model with my bapi and bapi_transaction_commit of course.
in wdDoInit of custom controler i wrote:
Bapi_User_Create_Input input = new Bapi_User_Create_Input();
wdContext.nodeBAPI_USER_CREATE_INPUT().bind(input);
input.setPassword(new Bapipwd());
input.setAddress(new Bapiaddr3());
input.setUsername("");
Bapi_Transaction_Commit_Input inputTrans = new Bapi_Transaction_Commit_Input();
wdContext.nodeBAPI_TRANSACTION_COMMIT().bind(inputTrans);
inputTrans.setWait(true);
i wrote 2 methods for both bapi
1st.
try{
wdContext.currentBAPI_USER_CREATE_INPUTElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
catch (Exception ex){
ex.printStackTrace();
2nd
try {
wdContext.currentBAPI_TRANSACTION_COMMITElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
} catch (Exception ex){
ex.printStackTrace();
View contains 4 input fields for user name, name, last name and password.
All of them are binded to the context.
Button create user triger code:
try{
wdThis.wdGetUserCreateCustController().executeBAPI_USER_CREATE_INPUT();
catch(Exception ex){
wdComponentAPI.getMessageManager().reportWarning(ex.toString());
wdThis.wdGetUserCreateCustController().executeBAPI_COMMIT();
What i'm doing wrong?
It dosent efect target system.
It dosen't even start fm because i try to debug it.
PS. I'm new to WD so sorry for some stupid things.
Hi,
1.first check whether the BAPi is working correctly with same values which u have set it in ur web dynpro application.
2. Check whether any exception is thrown: after executing the model use message manager to report exception.
wdComponentAPI.getmessageManager().reportException(ex);
or u can find the error logs in the NWA . login to NWA --> Problem management --> logs and Tracess --> log Viewer.
Thanks and Regards
Similar Messages
-
I have a HP Pavilion dv6 with a fingerprint reader. I had the same problem as many other people when upgrading to Firefox 4, : I couldn't use the HP Simple Pass to enter a website needing a username and password by just swiping my fingerprint. I fixed the problem by downloading the new HPSimPlePass 7.0.74.0. This fixed the problem and I was very happy. Since upgrading to Firefox 5 I have the same problem again, but I already have the new version of HP Simple Pass. How can this be fixed so that I can use this fingerprint scan feature again, or where can I download Firefox 4 again?
''FredMcD [[#answer-709783|said]]''
<blockquote>
The programers know of this and are working on it.
</blockquote> -
I'm having problem again rendering a one hour presentation. If I use Command/R, the dialog box indicates seven or more days. If I highlight the selection I get essentially the same estimated time.
Command/R usually works, but not this time. Audio For Playback is checked.
The DV timeline plays in Quick Time OK.
I desperately need to get this video sent out! I even deleted preferences using the "Preference Manager" program.
DavidAll of my lecture video series are recorded in LP 16 bit audio. Each lecture is between 1 to 1.5 hr in length. I have successfully completed 10 of the 23.
Each lecture is sent to iMovie HD and then the timeline.mov is placed into FCE. One other time the timeline audio would not render, so I converted it to DV via MPEG Stream Clip and placed it back into FCE. The lecture I'm having trouble with is #11.
As mentioned, usually Command-R will do the trick in 10 minutes or so, not 6 to 10 days.
David -
Explorer problem again????
I got explorer.exe problem again,which was solved previously by creating new user account.I am free from problem for around 1 month and started again, and this time very frequently i am getting windows with message that
"Windows Explorer has stopped working".I am using windows 7 professional service pack 1.Please any body give permanent solution to this problem,Problem details are below
Problem signature:
Problem Event Name: AutoVerifierV2
Application Name: explorer.exe
Application Version: 6.1.7600.16450
Application Timestamp: 4aeba271
Fault Module Name: verifier.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdb2a
Exception Code: 80000003
Exception Offset: 0000c0de
Status Code: 201
OriginalBucketID: 0
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: e903
Additional Information 2: e90395e1c160c582c0a3c5e6d36ee788
Additional Information 3: f03b
Additional Information 4: f03b4ab77c5a1d7b156e29c2436e59a6Hello,
The TechNet Sandbox forum is designed for users to try out the new forums functionality. Please be respectful of others, and do not expect replies to questions asked here.
Since your post is off-topic, I am moving it to the
off topic forum.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
when i want to install windows7 on my snow leopard(10.6.4) with boot camp assistant,said that you must update your mac,i do this and try to install windows7 again but i have this problem again?what can i do?
Graham Giles wrote:
Have you seen this type of problem before? I think it could be a serious issue for anyone in a similar position.
No; but then, I've not had occasion to use TDM. I've been using firerwire drives for over 10 years, both FW400 and FW800, with no issues except a bit of instability using a B&W G3 machine.
TDM should be safe. Using cautious, manual copying of files from the Target machine to the Host machine should not result in unexpected loss of files or damage to the Target drive's directories. It should behave exactly the same as if it were an external (to the Host) firewire drive.
• I don't suppose there is anything I can do to 'put back' lost items from a separate Time Machine drive which has an up to date backup on it.
There is probably a way to do that - seems to me that's one of the reasons for a Time Machine volume.
On the other hand, if the Time Machine volume is rigidly linked to the now-absent OS on the original drive, there may be no way to effectively access the files in the TM archive.
I know that using a cloned drive would work well in this instance.
I have no experience with Time Machine, so perhaps someone who has will chime in with suggestions.
With the machine in TDM with the other machine, have you tried running Disk Utility to see if you can effect repairs to the drive? -
Why am I having update problems again?
When I started Muse today I received a message that there was a new update and did I want to install. I said yes and it proceeded, when complete I received this pop up message:
Title, Adobe AIR - "Intial content could not be loaded for this application. Try re-installing or contacting the publisher for assistance".
But you can't re-install because it shows it's already installed. This happen to me a month ago and I had to un-install Muse & reboot before I could re-install.
Why is this happening? Is there a way I could open up Muse without going through a un-install again. This only happens with Muse updates which occur when starting Muse, other Adobe updates that take place through the Creative Cloud control panel are fine.
I just tried again, same problemHelp Again.
My computer just doesn't like Muse & apparently CC programs. After all this time when starting Muse I have been ignoring the message to update because I'm afraid if I say yes I will have the above problem again. Today I got brave and said yes and Muse would not open again!
So I returned to this site and used the link you gave me before to reinstall Muse, when it finished it told me that there was a newer version 7.4 available and would I like to install it and I said yes, and it seemed to work and opens fine.
I also had a request to install the latest update of Creative Cloud so I said yes. Everything went fine. I got really brave and I noticed that there was a newer version of Muse CC 2014 and I installed it but now that CC and other CC programs tell me I need a sign in with my adobe ID to try a 30 trial, if I press the License This Software button it asks me for a Serial Number. Why can't I open CC programs without a serial number, I am a Creative Cloud member? I have 2 Icons on my desktop, Adobe Muse.exe which works and Adobe Muse CC that tells me I need a serial number. -
My Iphone Has a Restart Problem Again and Again wot To do?
MY Iphone Has a restart problem again and again wot to do please tell me
Basics from the user guide are restart, reset, restore from backup, restore as new. If you go through ALL of those steps and you still have issues, you need to get your phone checked out by Apple.
-
I sent email to [email protected] but the engineer there said he did not receive it. Also, I did not receive the email he sent to me through his sun.com email. it sounds a dns problem again.
I have changed our mx record to:
@ IN MX junk.domain.com.
before, it was:
@ IN MX junk ==>would this cause dns problems?
Here is the entry in the mail.log which seemed that sun has received my email successfully:
09-Dec-2005 09:39:10.59 tcp_local D 2 [email protected] rfc822;[email protected] [email protected] dns;btmx1.sun.com (relay1.sun.com [IntraStore TurboSendmail] ESMTP Service ready) smtp;250 recipient <[email protected]> OKYour log shows that Sun did indeed receive your mail.
Sun's mail infrastructure has been under DOS attack for some days. Sometimes that's caused delays of up to several hours for inbound mail to get to us.
We also have had some virus infected systems pounding our servers. More delays.
We do contract with an external company to scan for spam/virus scanning. Those folk historically have lost us some mails, too.
Your MX record isn't likely to make any difference in you sending out mail, but in your ability to receive mails, yes. -
Hi all,
We are encountering performance problem again
The batch process deletes 1M rows every night which took 30mins the usual.
But last night (12AM) it took more that 2hrs and hangs.
Does it help if I run gather_schena stats regularly when there is constant DELETE on the table?
Please help me check our ASH, AWR, ADDM to resolve the issue.
ADDM
https://app.box.com/s/7o734e70aa2m2zg087hf
ASH
https://app.box.com/s/xadlxfk0r5y7jvtxfsz7
AWR
https://app.box.com/s/x8ordka2gcc6ibxatvld
Thanks....
zxyHi ARM,
***What is the SGA_TARGET or MEMORY_TARGET that the database is running on?
Our server has 8Gb Physical Memory and 8Gb Swap.
What is the ideal SGA_TARGET and MEMORY_TARGET shouldbe?
Our current setting is:
========
SQL> show parameter memory
NAME TYPE VALUE
hi_shared_memory_address integer 0
memory_max_target big integer 5936M
memory_target big integer 5936M
shared_memory_address integer 0
SQL> show parameter sga_
NAME TYPE VALUE
sga_max_size big integer 5936M
sga_target big integer 0
Thanks -
Post moved to infinity board http://community.bt.com/t5/BT-Infinity/BT-Problems-Again/td-p/544347
If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’I was going to put it in the Infinity forum but as there were other similarish ones here, and that my problem is reagrding a connection issue (my modem gets Inifinity just fine), I thought thought the connection issues forum would be the correct place.
Also as HH3 is not Infinity specific, I thought the problem was not necessarily Inifinity specific either
Even so, thanks for putting in the correct place. -
Problem again with flickering and no firmware update
I've got the problem again....
I think I'll leave Imac world ....I had the flickering problem with my new iMac, it was resolved with the new software update to 10.4.6.
-
Maintainence order bapi problem - to get time of MO creation
Hi ,
I am using
BAPI_ALM_ORDERHEAD_GET_LIST to get maintainence orders from ECC
It is giving me details like who created the order and when.
I also need to find out at what time the order was created.
But the return has 9 output time data and i am not able to understand which of these denote which time field returns the MO order creation time
I also tried
BAPI_ALM_ORDER_GET which gives back the details of any MO but
again i face d the same problem.
Can anyone help me to find the field which stores
the time at which MO is created.?
Also if possible can one please explain -
what do all the various time fields denote?
Thanks and Regards
Points assured for help.I think it is ACTUAL_START_TIME field.
But anyways after executing the BAPI, You will have all the Order details in the return parameter.
Go to AUFK table give one order number to AUFNR. And check the entry date and map the value to the return parameters in the BAPI -
BAPI - Problem in Sales order creation
Hi Friends,
I have problem in Sales order creation using BAPI ,I am getting a messsage - Error in creating document ,I have sent the code along with this mail ,can you help it out.
Code:
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 OBLIGATORY.
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.
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'.
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'.
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'.
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.
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.
Regards,
Dineshwhat messages u are gettting in RETURN ? Please check the RETURN tables data.
[code]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.
Regards
Prabhu -
PO BAPI Problem in condition types
Hi,
I am facing a strange problem in creation of PO through "BAPI_PO_CREATE1".
In the Item condition internal table, I am passing the condition types.
The PO is getting created successfully.
Eg. I pass conditions and their values as follows:
PB00 : 1000
ZB00 : 1000
FRB1 : 1000
The PO is created successfully and we can check the prices updated properly.
Now,
When I create a second PO with the same values, the prices are taken from the last PO and the prices from
my code(which are passed through BAPI) are added to the last value.
If I run the program with the same values as above, the PO is created with the values 2000.
Third time it is 3000 and so.
The value from the last PO is coming into the new PO.
Please advise me if anything missing.
My code is below::
================
*& Report ZTEST_PO
REPORT ZTEST_PO.
data : HEADER like BAPIMEPOHEADER .
data : HEADERX like BAPIMEPOHEADERX .
data : POITEM like BAPIMEPOITEM occurs 0 with header line.
data : POITEMX like BAPIMEPOITEMX occurs 0 with header line.
data : POSCHEDULE like BAPIMEPOSCHEDULE occurs 0 with header line.
data : POSCHEDULEX like BAPIMEPOSCHEDULX occurs 0 with header line.
DATA : RET LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
DATA : ret1 like bapiret2.
Data PO like BAPIMEPOHEADER-PO_NUMBER.
data : pocond like BAPIMEPOCOND occurs 0 with header line.
data : pocondx like BAPIMEPOCONDX occurs 0 with header line.
*pocond-CONDITION_NO = '00000'.
pocond-itm_number = '000010'.
pocond-COND_ST_NO = '001' .
*pocond-COND_COUNT = '1'.
pocond-COND_TYPE = 'PB00'.
pocond-COND_value = '500'.
pocond-CURRENCY = 'EUR'.
pocond-CURRENCY_ISO = 'EUR'.
pocond-CHANGE_ID = 'I'.
APPEND POCOND.
**pocond-CONDITION_NO = '00000'.
*pocond-itm_number = '000010'.
*pocond-COND_ST_NO = '10' .
*pocond-COND_COUNT = '2'.
*pocond-COND_TYPE = 'PBXX'.
*pocond-COND_value = '555'.
*pocond-CURRENCY = 'EUR'.
*pocond-CURRENCY_ISO = 'EUR'.
*pocond-CHANGE_ID = 'U'.
*APPEND POCOND.
**pocond-CONDITION_NO = '00000'.
*pocond-itm_number = '000010'.
*pocond-COND_ST_NO = '20' .
*pocond-COND_COUNT = 0.
*pocond-COND_TYPE = 'ZB00'.
*pocond-COND_value = '666'.
*pocond-CURRENCY = 'EUR'.
*pocond-CHANGE_ID = 'U'.
*APPEND POCOND.
**pocond-CONDITION_NO = '00000'.
*pocond-itm_number = '000010'.
*pocond-COND_ST_NO = '30' .
*pocond-COND_COUNT = 0.
*pocond-COND_TYPE = 'FRB1'.
*pocond-COND_value = '777'.
*pocond-CURRENCY = 'EUR'.
*pocond-CHANGE_ID = 'U'.
*APPEND POCOND.
*pocondx-CONDITION_NO = '00000'.
POCONDX-ITM_NUMBER = '000010'.
POCONDX-COND_ST_NO = '000'.
*POCONDX-CONDITION_NOX = 'X'.
*POCONDX-COND_ST_NOX = 'X'.
POCONDX-ITM_NUMBERX = 'X'.
*POCONDX-COND_COUNT = 'X'.
POCONDX-COND_TYPE = 'X'.
POCONDX-COND_value = 'X'.
pocondX-CURRENCY = 'X'.
*pocondX-CURRENCY_ISO = 'X'.
pocondX-CHANGE_ID = 'X'.
APPEND POCONDX.
HEADER-COMP_CODE = 'TF01'.
HEADER-DOC_TYPE = 'DMPO'.
HEADER-VENDOR = '0000000317'.
HEADER-LANGU = 'EN'.
HEADER-PURCH_ORG = '1001'.
HEADER-PUR_GROUP = '110'.
HEADER-CURRENCY = 'EUR'.
HEADER-DOC_DATE = '22.10.2007'.
HEADER-REF_1 = '999999999999'.
HEADERX-VENDOR = 'X'.
HEADERX-PURCH_ORG = 'X'.
HEADERX-PUR_GROUP = 'X'.
HEADERX-REF_1 = 'X'.
POITEM-PO_ITEM = '00010'.
POITEM-MATERIAL = '00042199730L'.
POITEM-PLANT = '1000'.
POITEM-STGE_LOC = '1030'.
POITEM-MATL_GROUP = '01'.
POITEM-QUANTITY = '10'.
POITEM-PRICE_UNIT = 500.
poitem-calctype = 'C'.
append POITEM.
POITEMX-PO_ITEM = '00010'.
POITEMX-MATERIAL = 'X'.
POITEMX-PLANT = 'X'.
POITEMX-QUANTITY = 'X'.
POITEMX-PRICE_UNIT = 'X'.
append POITEMX.
POSCHEDULE-PO_ITEM = '00010'.
POSCHEDULE-DELIVERY_DATE = '30.10.2007'.
append POSCHEDULE.
POSCHEDULEX-PO_ITEM = '00010'.
POSCHEDULEX-PO_ITEMX = 'X'.
POSCHEDULEX-DELIVERY_DATE = 'X'.
append POSCHEDULEX.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = HEADER
POHEADERX = HEADERX
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPPURCHASEORDER = PO
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = RET
POITEM = POITEM
POITEMX = POITEMX
POADDRDELIVERY =
POSCHEDULE = POSCHEDULE
POSCHEDULEX = POSCHEDULEX
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER = POCOND
POCONDHEADERX = POCONDX
POCOND = POCOND
POCONDX = POCONDX
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
POCOMPONENTS =
POCOMPONENTSX =
POSHIPPING =
POSHIPPINGX =
POSHIPPINGEXP =
NFMETALLITMS =
if RET-type NE 'E'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = ret1.
write : ' PO Created : ', PO .
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
RETURN = ret1.
ENDIF.
================Any input??
-
REPORT zbapi_create_po .
*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 : 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 '1000' ,
doctyp LIKE header-doc_type DEFAULT 'NB' ,
cdate LIKE header-creat_date DEFAULT sy-datum ,
vendor LIKE header-vendor DEFAULT '1005',
pur_org LIKE header-purch_org DEFAULT '1000' ,
pur_grp LIKE header-pur_group DEFAULT '026' .
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 'DPC1017' ,
plant LIKE item-plant DEFAULT '1200' ,
quantity LIKE item-quantity DEFAULT 100.
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-vendor = vendor .
header-langu = ws_langu .
header-purch_org = pur_org .
header-pur_group = pur_grp .
*POPULATE HEADER FLAG.
headerx-comp_code = c_x.
headerx-doc_type = c_x.
headerx-creat_date = c_x.
headerx-vendor = c_x.
headerx-langu = c_x.
headerx-purch_org = c_x.
headerx-pur_group = c_x.
headerx-doc_date = c_x.
*POPULATE ITEM DATA.
item-po_item = item_num.
item-material = material.
item-plant = plant.
item-quantity = quantity.
APPEND item.
*POPULATE ITEM FLAG TABLE
itemx-po_item = item_num.
itemx-material = c_x.
itemx-plant = c_x .
itemx-stge_loc = c_x .
itemx-quantity = c_x .
itemx-tax_code = c_x .
itemx-item_cat = c_x .
itemx-acctasscat = c_x .
APPEND itemx.
*BAPI CALL
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = header
poheaderx = headerx
POADDRVENDOR =
TESTRUN =
IMPORTING
EXPPURCHASEORDER =
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = return
poitem = item
poitemx = 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 / return-message.
ENDLOOP.
I am getting this message, can u give me any ideas, where is the problem in code ?
<b>Creation of PO unsuccessful
PO Header data Still faulty
Purchase Order date is in the past
For the K4 fiscal year variant, no peroid is defined for 00.00.0000</b>
points for sure
Thanks in Advance
VijayaTry by passign doc_date.
header-pur_group = sy-datum.
Maybe you are looking for
-
While posting the Asset in f-90 the serives tax is not calculting
hi experts, While posting the Asset in f-90 the serives tax is not calculating,even i entered in bussiness place? thanks in advance satya
-
Error during the attach of a Tabular model - SSAS 2012
Hi, I've changed the DataDir for a SSAS Tabular instance by specifying another drive letter and a path like "E:\Microsoft SQL Server\MSAS11.SQLSERVER2012\OLAP\Data". After the restarting of the SSAS service I'm trying to attach the tabular model but
-
Apple tv , Bose cinemate series 2, no sound
I just bought a Bose Cinemate series 2 system , bought used from 2009. When I plug the Bose system through the tv box it runs / sounds perfect. But when I use the apple tv I get no sound. Im using audio cables from the bose reciever , plugging them i
-
Hi Frnds, PROFESSONAL TAX FORM - I CHANGE TO SUBMISSION NAME CORPORATION OF COIMBATORE At Present it is showing as CORPORATION OF CHENNAI. Please Guide. It Very Urgent. Raghav
-
I have created 4 users access levels, however, when I try to implement, when I keep inheritence, default security keeps coming up, e.g. try changing everyone to my new access level and I get the new access level, but I also get view (inherited) - h