Issue with posting G/L using the BAPI " BAPI_ACC_DOCUMENT_POST"
Hi all,
I am trying to create a G/L document using the BAPI "BAPI_ACC_DOCUMENT_POST". The Bapi is returning me a success message, but i am not able to see the document in BKPF/BSEG.
Can somebody please let me know if there is any customization that needs to be done to get the document number reflected in the corresponding tables after i execute this BAPI.
Here is the part of the code that i am using to fill the header structure:
docheader-obj_type = 'REACI'.
docheader-obj_key = 'TEST'.
docheader-obj_sys = 'ECSCLNT010'.
docheader-bus_act = 'RFBU'.
docheader-username = sy-uname.
docheader-header_txt = 'HDR TEXT'.
docheader-comp_code = 'SC01'.
docheader-doc_date = sy-datum.
docheader-pstng_date = sy-datum.
CASE wa_input_tmp-batch_type .
WHEN '0'.
docheader-doc_type = 'SA'.
WHEN '1'.
docheader-doc_type = 'RA'.
ENDCASE.
Any help is much appreciated.
Thanks in Advance,
Suresh
See the below code :
I have tested program in my system :
*&---HEADER DECLARATION
DATA: HEADER TYPE BAPIACHE09. " HEADER DATA
INTERNAL TABLE DECLARATION
*&----G/L ACCOUNT ITEM
DATA: ACCOUNTGL TYPE STANDARD TABLE OF BAPIACGL09.
*&---CURRENCY ITEMS
DATA: CURRENCY_AMOUNT TYPE STANDARD TABLE OF BAPIACCR09.
*&----RETURN PARAMETER
DATA: RETURN TYPE STANDARD TABLE OF BAPIRET2 with header line.
WORK-AREA DECLARATION
*&----WORKAREA FOR G/L ACCOUNT ITEM
DATA: WA_ACCOUNTGL TYPE BAPIACGL09.
*&---WORKAREA FOR CURRENCY ITEMS
DATA: WA_CURRENCY_AMOUNT TYPE BAPIACCR09.
INITIALIZATION
HEADER-HEADER_TXT = 'TEST HEADER'.
HEADER-USERNAME = 'DEVELOPER'.
HEADER-COMP_CODE = '0002'.
HEADER-FISC_YEAR = '2007'.
HEADER-DOC_DATE = '20070502'.
HEADER-PSTNG_DATE = '20070502'.
HEADER-TRANS_DATE = '20070502'.
HEADER-DOC_TYPE = 'SA'.
HEADER-BUS_ACT = 'RFBU'.
WA_ACCOUNTGL-ITEMNO_ACC = '0000000010'.
WA_ACCOUNTGL-GL_ACCOUNT = '0000113020'.
WA_ACCOUNTGL-ITEM_TEXT = 'SO_DOC'.
WA_ACCOUNTGL-DE_CRE_IND = 'S'.
APPEND WA_ACCOUNTGL TO ACCOUNTGL.
CLEAR WA_ACCOUNTGL.
WA_ACCOUNTGL-ITEMNO_ACC = '0000000020'.
WA_ACCOUNTGL-GL_ACCOUNT = '0000113020'.
WA_ACCOUNTGL-ITEM_TEXT = 'SO_DOC'.
WA_ACCOUNTGL-DE_CRE_IND = 'H'.
APPEND WA_ACCOUNTGL TO ACCOUNTGL.
CLEAR WA_ACCOUNTGL.
WA_CURRENCY_AMOUNT-ITEMNO_ACC = '0000000010'.
WA_CURRENCY_AMOUNT-AMT_DOCCUR = '500'.
WA_CURRENCY_AMOUNT-CURRENCY = 'INR'.
APPEND WA_CURRENCY_AMOUNT TO CURRENCY_AMOUNT.
CLEAR WA_CURRENCY_AMOUNT.
WA_CURRENCY_AMOUNT-ITEMNO_ACC = '0000000020'.
WA_CURRENCY_AMOUNT-AMT_DOCCUR = '-500'.
WA_CURRENCY_AMOUNT-CURRENCY = 'INR'.
APPEND WA_CURRENCY_AMOUNT TO CURRENCY_AMOUNT.
CLEAR WA_CURRENCY_AMOUNT.
START-OF-SELECTION
START-OF-SELECTION.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = HEADER
CUSTOMERCPD =
CONTRACTHEADER =
IMPORTING
OBJ_TYPE =
OBJ_KEY =
OBJ_SYS =
tables
ACCOUNTGL = ACCOUNTGL
ACCOUNTRECEIVABLE =
ACCOUNTPAYABLE =
ACCOUNTTAX =
currencyamount = CURRENCY_AMOUNT
CRITERIA =
VALUEFIELD =
EXTENSION1 =
return = RETURN
PAYMENTCARD =
CONTRACTITEM =
EXTENSION2 =
REALESTATE =
IF return-type NA 'EA'.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
IMPORTING
RETURN = RETURN.
write:/ return-message.
else.
write:/ return-message.
ENDIF.
Reward Points if it is helpful
Thanks
Seshu
Similar Messages
-
Issue with creating a G/L account using the BAPI "BAPI_ACC_DOCUMENT_POST"
Hi All,
I am trying to create a G/L account (FB50) using the BAPI "BAPI_ACC_DOCUMENT_POST". Can somebody help in populating values to the following parameters :
1) OBJ_TYPE
2) OBJ_KEY
3) BUS_ACT
I tried passing BKPF & BKPFF to the Object type but i am getting error saying that "Incorrect Entry".
Please let me where to find the values for the fields.
Any Help is much appreciated.
Thanks in Advance.Hi Ram,
Thanks for your input. The BAPI is working fine now, but one small change, i am passing REACI for the object type instead of BKPFF.
Here's the values that i am passing to the BAPI.
OBJ_TYPE REACI
OBJ_KEY TEST
OBJ_SYS ECSCLNT010
BUS_ACT RFBU
USERNAME KKUMAR
HEADER_TXT TEST_BAPI
Thanks Once agian. -
Need to upload mass excel sheet using the bapi bapi_acc_document_post.
I am assigned with an object, where I need to post the records from a mass excel sheet in to ECC or/and BW basing the dimensions using the bapi bapi_acc_document_post.the excel sheet has header and Item data. I am pretty much new to this bapi's
please do the need fulCheck report "ACC_BAPI_TEST_INVOICE_RECEIPT",
this report calls BAPI "BAPI_ACC_INVOICE_RECEIPT_POST",
but the parameters are nearly the same.
Best Regards, Dirk -
Reversing a document using the bapi 'BAPI_ACC_DOCUMENT_REV_POST'
Hi All,
I have posted a document using the FM 'BAPI_ACC_DOCUMENT_POST' and it is working fine .
How can I reverse the same posted document using the FM
'BAPI_ACC_DOCUMENT_REV_POST'?
What are the mandatory parameters to be filled?
Can anyone explain me with a example
Thanks in Advance.Hi Siva,
The bapi you have mentioned is the correct one.
Look at the BAPI documentation which is pretty informative.
In case you don't have it, i'm just copy pasting it.
Functionality
Reversing an external document in Accounting. (negative posting)
The method "Reverse" can be used to reverse the relevant document in the accounting components.
Parameters
REVERSAL
Reference information for reversal in Accounting
Description
Parameter for transferring a reversal document. The reversal document for the source document is not transferred - the reversal documents are generated in the individual components from the documents to be reversed. This is only possible however, if the corresponding documents are available, meaning that line item update is active in all components and no documents have been archived. If this is not the case, an appropriate error message is issued in the return parameter. If this happens, the document can only be reset by means of a corresponding inverse posting by the sender.
You must make entries in the following fields
Reversal document number:
OBJ_TYPE Sender ID
OBJ_KEY Reference number of the reversal document (source document)
OBJ_SYS Logical system
OBJ_KEY_R Reference number of the document to be reversed.
Default
All other fields are transferred from the FI document to be reversed.
BUS_ACT
Business Transaction
Description
To reverse the document, the same business transaction must be entered that was used for the posting.
OBJ_TYPE
Reference procedure
Source document
Description
When a business transaction is updated in Accounting, it may be that several documents are updated at the same time (FI document, CO document, etc). If the business transaction is not initiated in Accounting, a source document must exist outside Accounting. The information from this document must be transferred when the FI/CO interface is called up. The source information is updated in all accounting documents, and is made up of the following fields:
AWTYP (OBJ_TYPE) Reference transaction
Sender ID
AWKEY (OBJ_KEY) Reference key
Source document number
The reference key is made up of:
AWREF Reference document number (10 digits)
Source document number
AWORG Reference organizational unit (10 digits)
Number range ID (if required)
AWSYS (OBJ_SYS) Logical system
Logical system of source document
When the document is being processed, the system checks whether a reference document number (first part of the reference key) has been transferred.
Notes
Use a separate value in the OBJ_TYPE field (reference transaction). You must maintain an entry for this value in table TTYP, which could be a function module that is called when the user wants to branch back to the source/sender document from an accounting document. This makes it possible for documents updated using BAPIs to be included in the document navigation (revision). If you use SAP defined characters in the field OBJ_TYPE, errors can occur in the navigation.
The FI and CO line item suppression is defined separately for each reference transaction.
It is not necessary to separate the reference key into reference document number and reference organizational unit. This means that reference document numbers that are longer than 10 digits can be transferred into the reference key.
OBJ_KEY
Reference Key
Source document
Description
When a business transaction is updated in Accounting, it may be that several documents are updated at the same time (FI document, CO document, etc). If the business transaction is not initiated in Accounting, a source document must exist outside Accounting. The information from this document must be transferred when the FI/CO interface is called up. The source information is updated in all accounting documents, and is made up of the following fields:
OBJ_SYS
Logical system of source document
Source document
Description
When a business transaction is updated in Accounting, it may be that several documents are updated at the same time (FI document, CO document, etc). If the business transaction is not initiated in Accounting, a source document must exist outside Accounting. The information from this document must be transferred when the FI/CO interface is called up. The source information is updated in all accounting documents, and is made up of the following fields:
AWTYP (OBJ_TYPE) Reference transaction
RETURN
Return Parameter
Description
This table contains the return messages from the method call.
Value range
The first message contains the general status of processing:
Type ID Number Message
S RW 605 Document posted successfully
S RW 614 Document check without errors
A RW 609 Error in document
The fields MESSAGE_V1, MESSAGE_V2 and MESSAGE_V3 contain the following information:
Reference transaction ( OBJ_TYPE)
Reference key ( OBJ_KEY)
Logical system of source document ( OBJ_SYS)
Additional messages are transferred with the following information:
Parameter ( PARAMETER)
Row ( ROW)
Field ( FIELD)
in which the error occurred.
REgards.
Ravi -
Error while using the Bapi BAPI_GOODSMVT_CREATE
Hi all,
I am using the BAPI BAPI_GOODSMVT_CREATE to Upload the Data in MB01 and for creating the MATERIAL DOCUMENT for Multiple Lineitems at a time.
But i am getting the error as * NO ITEMS WERE TRANSFERRED*
I am using two separate intenal tables One for Header records and One for Line item records
and passing the tables in the BAPI.
Please Solve my issue and if possible please send me the sample code along with the flatfile or excel sheet.
Thanks and Regards
ajayCheck the below link for a sample code.
[http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm|http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm]
Hope this helps.
Thanks,
Balaji -
Error while posting a document using the BAPI_GOODSMVT_CREATE
Hi,
i was trying to post the Goods Receipt document ( Tcode MB1C) using the bapi BAPI_GOODSMVT_CREATE
i am passing the item details and Serial number details.
the error triggered was Maintain Serial Numbers for Total Quantity
but i am passing the quantity as 1 ( in item data) and passing one serial number.
is this error because of data problem or am i missing to pass the value to some dependent parameter..?
Please help me out.
Thanks in advance.
SriramHi David,
i was tring to pass the same.
in item table we have we have four item details ( below)
RES_ITEM - Item Number of Reservation/Dependent Requirement
ORDER_ITNO - Order Item Number
S_ORD_ITEM - Item Number in Sales Order ( length mismatch with serial item number)
PO_ITEM - Item Number of Purchasing Document ( length mismatch with serial item number)
out 4 , 2 are ruled out because of length mismatch. and in the reaming two are
RES_ITEM - Item Number of Reservation/Dependent Requirement
ORDER_ITNO - Order Item Number
this is a Goods receipt document, please let me know which field is required to map with item number in the above two.
Regards,
Sriram. -
Using the bapi BAPI_INSPECTIONPLAN_CREATE
Hi ,
I am using the bapi BAPI_INSPECTIONPLAN_CREATE to create inspection plans.
Here I am facing one issue, as a part of this creation in inspection characteristics, I am not able to
handle all the control indicators.
In this control indicators under Results confirmation block I dont see fields in the BAPI to handle
radiobuttons for 1. Required Char 2. Optional Char 3. After Accep. 4 After Rejection
If anybody is familiar with this BAPI, please help me.
Thanks,
RaviHi Neha,
Sorry to say this, It does not answers my question. I am having the program created by someone else. The issue is the program is not able to populate the control indicators as specified in the file. Because the programmer has not populated those values in the BAPI, even the program you had given is not having those fields. Also I am not able to find the correct fields to populate the values into the BAPI. If you know this specific thing please help me out.
Thanks,
Ravi.
Edited by: ravi itekala on Dec 4, 2008 1:51 PM -
Starnge issue with posting periods
Hi All,
I am facing a strange issue with posting periods....
When I go to OMSY i can see that periods 10 & 9 are open. the I go to MMPV and close periods. Again when I go back into OMSY I can see that now periods 11 & 10 are open. But after sometime when I try to do invoice posting I get the error that posting only possible in periods 10 & 9. I checked in OMSY and it now shows that periods 10 & 9 are open!!
I have closed periods using MMPV atleast 5 times now....I really fail to understand why or how the periods are changing in OMSY?
Regards,
V SHi,
Check in MARV table, if it is still open, while close the period in MMPV, check you are getting message as "Period closed log issued"
Regards,
Prabu -
Create a Purchase order using the BAPI using the data in the XML file.
Hello Gurus,
here is the scenario can anyone help me how to proceed explaining the procedure?
Create a Purchase order using the BAPI using the data in the XML file.
comprehensive explanations are appreciated.
thanks in advance.hi,
first use fm "bapi_po_create".
then use fm "BAPI_ACC_GL_POSTING_POST"
The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM). -
Hello everyone.
Faced very strange issue with account, which is used to run SSIS package.
The specific package uses Foreach Loop Container to retrieve file names within the specified folder, and put them into Import file task.
The package is set up to run under specific service account. This service account is given all permissions (Full control) to the folder where source files reside.
So the issue is: SSIS package fails to execute this task (Foreach Loop Container and then Import), and shows that no files are found in the directory (although files ARE there).
Once we're adding the service account into local Administrators group on the SQL Server, it works! Removing - does not work again. We cannot leave the service account as SQL server's admin as it's prohibited by our IT policies, and is just a bad practice.
Any ideas, please?
MCPHere's the real log output:
Date 16.04.2014 12:47:09
Log Job History (RU-BW: Update)
Step ID 1
Server Server
Job Name RU-BW: Update
Step Name bw_import_cust_master_data
Duration 00:00:02
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: service_account Microsoft (R) SQL Server Execute Package Utility Version 10.50.4286.0 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 12:47:09 Error: 2014-04-16 12:47:11.45
Code: 0xC0202070 Source: bw_import_cust_master_data Connection manager "Input" Description: The file name property is not valid. The file name is a device or contains invalid characters. End Error Error:
2014-04-16 12:47:11.47 Code: 0xC0202070 Source: bw_import_cust_master_data Connection manager "Input" Description: The file name property is not valid. The file name is a device or contains invalid characters. End
Error Error: 2014-04-16 12:47:11.48 Code: 0xC0202070 Source: bw_import_cust_master_data Connection manager "Input" Description: The file name property is not valid. The file name is a device or contains invalid
characters. End Error Error: 2014-04-16 12:47:11.48 Code: 0xC020207E Source: Import file Flat File Source [1] Description: The file name is not valid. The file name is a device or contains invalid characters.
End Error Error: 2014-04-16 12:47:11.48 Code: 0xC004701A Source: Import file SSIS.Pipeline Description: component "Flat File Source" (1) failed the pre-execute phase and returned error code 0xC020207E.
End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 12:47:09 Finished: 12:47:11 Elapsed: 2.324 seconds. The package execution failed. The step failed.
MCP -
Issue with Parent child dashboards using SWFLoader component
Hello Gurus,
I am using Parent-child dashboards approach in our project.
I have multiple child files embedded in Parent dashboard using the SWFLoader (directly passing the URL as SWFLoader value) to load child dashboards. All the child, parent swf's are saved in the same intranet folders.
When I open the parent SWF, everything loads fine in the intranet.
But for some users, when they open from the intranet, the child dashboard doesnt load up properly or size of the dashboard gets reduced to a small version. (Iam sure that it has nothing to do with the access/privileges)
Any thoughts/ideas what could be causing an issue with child dashboard/resizing of the child dashboard.
Please help!
regards,
S RCheck whether the machine has compatible flash version in error specific machine and your machine.
-
Creating the Sales Order using the bapi BAPI_SALESORDER_CREATEFROMDAT2
Hi,
My problem is , i have created one module pool program for accelerating the Sales Order creation.
I am using the bapi BAPI_SALESORDER_CREATEFROMDAT2 for sales order creation. After executing the program
bapi is given an errot that, incomplete sales order document is saved.
Can any body tell me plz what are the necessary fields i need to take in the header and item level , so that the complete
document will be saved through BAPI.
<removed_by_moderator>
Thanks
Edited by: Julius Bussche on Jan 11, 2010 12:09 PMTABLES: VBAK, "Sales Document: Header Data
VBAP. "Sales Document: Item Data
*************************************WORK AREA DECELERATION************************
DATA: BEGIN OF WA_HEADER,
LI TYPE I, "LINE TYPE
AUART TYPE VBAK-AUART, "Sales Document Type
VKORG TYPE VBAK-VKORG, "Sales Organization
VTWEG TYPE VBAK-VTWEG, "Distribution Channel
SPART TYPE VBAK-SPART, "Division
KUNNR TYPE BAPIPARNR-PARTN_NUMB, "Customer number
END OF WA_HEADER.
DATA: BEGIN OF WA_ITEM,
LI TYPE I,
MATNR TYPE VBAP-MATNR, "MATERIAL NUMBER
ZMENG TYPE VBAP-ZMENG, "QUANTITY
END OF WA_ITEM.
***********************************INTERNAL TABLE DECELERATION***************************************
DATA: IT_HEADER LIKE TABLE OF WA_HEADER WITH HEADER LINE. "IT FOR HEADER
DATA: IT_ITEM LIKE TABLE OF WA_ITEM WITH HEADER LINE. "IT FOR ITEM
DATA: IT LIKE VBAK OCCURS 0 WITH HEADER LINE.
***************************SALES ORDER INTERNAL TABLE DECELERATION********************************
DATA:
HEADER TYPE TABLE OF BAPISDHEAD WITH HEADER LINE, "SALES HEADER DATA
ITEMS TYPE TABLE OF BAPIITEMIN WITH HEADER LINE, "SALES ITEM DATA
PARTNERS TYPE TABLE OF BAPIPARTNR WITH HEADER LINE. "SALLES PARTNERS
***********************************DYNAMIC FIEL PATH GETTING DECELERATION************************
DATA : HL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_SPATH', "SCREEN FIELD NAME
HL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_SPATH', "Local file for upload/download
IL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH', "SCREEN FIELD NAME
IL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH', "Local file for upload/download
FL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH', "SCREEN FIELD NAME
FL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH'. "Local file for upload/download
DATA : CTR TYPE I .
DATA : CTR2 TYPE STRING.
DATA : CTR1 TYPE STRING.
Sales document number
DATA : L_VBELN LIKE BAPIVBELN-VBELN.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
SELECTION-SCREEN : SKIP.
PARAMETER : P_HPATH TYPE STRING.
PARAMETER : P_IPATH TYPE STRING.
SELECTION-SCREEN : SKIP.
SELECTION-SCREEN : END OF BLOCK B1.
SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE T2.
SELECTION-SCREEN : SKIP.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN : PUSHBUTTON 10(14) UPLOAD USER-COMMAND CLICK1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
******************************************INITIALIZATION.***************************************************
INITIALIZATION.
T1 = 'Putchase Order Source File Path'.
T2 = 'Push Button'.
UPLOAD = 'Upload'.
*******************************************AT SELECTION SCREE EVENT********************************************
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'CLICK1'.
IF P_HPATH IS INITIAL AND P_IPATH IS INITIAL. "CHECKING BTHE THE TEXT BOX
MESSAGE I009.
ELSE.
PERFORM SELECT. "CALLING THE SELECT SUBROUTINE
ENDIF.
WHEN OTHERS.
MESSAGE 'PRESS FORM BUTTON' TYPE 'I'. "WHEN EXECUTE BUTTON IS PRESSED
ENDCASE.
***********************************GETTING HEADER FIEL PATH*******************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_HPATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = HL_FIELD_NAME
IMPORTING
FILE_NAME = HL_FILE_NAME.
P_HPATH = HL_FILE_NAME.
***********************************GETTING ITEM FIEL PATH*******************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = IL_FIELD_NAME
IMPORTING
FILE_NAME = IL_FILE_NAME.
P_IPATH = IL_FILE_NAME.
START-OF-SELECTION.
*& Form SELECT
text
--> p1 text
<-- p2 text
FORM SELECT .
CALL FUNCTION 'GUI_UPLOAD' " function resposible to get the local flat
EXPORTING " and upload it in a internal table
FILENAME = P_HPATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
TABLES
DATA_TAB = IT_HEADER.
CALL FUNCTION 'GUI_UPLOAD' " function resposible to get the local flat
EXPORTING " and upload it in a internal table
FILENAME = P_IPATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
TABLES
DATA_TAB = IT_ITEM.
LOOP AT IT_HEADER.
Initialize Header values
HEADER-DOC_TYPE = IT_HEADER-AUART.
HEADER-SALES_ORG = IT_HEADER-VKORG.
HEADER-DISTR_CHAN = IT_HEADER-VTWEG.
HEADER-DIVISION = IT_HEADER-SPART.
APPEND HEADER.
PARTNERS-PARTN_ROLE = 'WE'.
PARTNERS-PARTN_NUMB = IT_HEADER-KUNNR.
APPEND PARTNERS.
CTR = 10.
LOOP AT IT_ITEM WHERE LI = IT_HEADER-LI.
CTR2 = CTR.
CONCATENATE '0000' CTR2 INTO CTR1.
***Initialize Item values
ITEMS-ITM_NUMBER = IT_ITEM-ITEM.
ITEMS-ITM_NUMBER = CTR1.
ITEMS-MATERIAL = IT_ITEM-MATNR.
ITEMS-REQ_QTY = IT_ITEM-ZMENG.
APPEND ITEMS.
CTR = CTR + 10.
ENDLOOP.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
ORDER_HEADER_IN = HEADER "SALES HEADER DATA
IMPORTING
SALESDOCUMENT = L_VBELN "RETRIEVED SALES DOCUMENT NUMBER
TABLES
ORDER_ITEMS_IN = ITEMS "SALES ITEM LEVEL DATA
ORDER_PARTNERS = PARTNERS. "SAKES PARTNERS
APPEND L_VBELN TO IT.
COMMIT WORK AND WAIT.
CLEAR : HEADER , ITEMS[] ,PARTNERS,CTR,CTR1,CTR2.
REFRESH : ITEMS.
ENDLOOP.
IF IT[] IS NOT INITIAL.
LOOP AT IT.
WRITE: / 'SALES ORDER', IT-VBELN , 'CREATED'.
ENDLOOP.
LEAVE TO LIST-PROCESSING.
SET PF-STATUS SPACE.
ELSE.
MESSAGE I044.
ENDIF .
ENDFORM. " SELECT -
Create a work order using the BAPI for IW31
Hi,
I want to create a work order using the BAPI for IW31 tr. can any one help me with the program description.
Full points will be awarded for the useful answers.
Thanks and regards,
Sunilhi,
first use fm "bapi_po_create".
then use fm "BAPI_ACC_GL_POSTING_POST"
The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM). -
Consuming an RFC Call Using the BAPI eWay
Greetings all,
We are trying to set up a scenario in which we have a custom RFC function that we are calling synchronously using the BAPI eWay. Here, an ABAP program calls an RFC which is like a proxy on the JCAPS server. On the JCAPS side, we are wanting to map the RFC onto a Web Service call and pass the results back as the exporting parameters of the RFC. While the examples demonstrate the use of an asynchronous function module such as IDOC_INBOUND_ASYNCHRONOUS, it is not clear to me how to work with synchronous calls. Any information would be greatly appreciated. Thanks.
Best Regards,
James Wood
Bowdark Consulting, Inc.
[email protected]I have a similar (if not identical) problem. Chris, your reply to James is talking about the process originating within JCaps. In my scenario (and it sounds like James' too), the process is originating from SAP. What I'm trying to do is this:
SAP calls to my JCD - this is the part that I'm having trouble with
My JCD does something with the data sent to it from SAP (call a database or whatever)
The JCD responds back to SAP so that the request/reply cycle can complete and the SAP program has what it needs
When I create an OTD object in JCaps using my RFC, there doesn't seem to be a way to make the JCD that I want to create use that OTD as a source for the input message.
James, if I'm way off base here, let me know and I'll go get my own thread. :)
Any help or direction would be appreciated. I've Googled this to death and have come up short. -
LightweightDispatcher issue with Applets in Browser using Java 7, not 6
Spent the last year at work setting up some GUI JApplets for demos our of code. The JApplets house a number of layers of JPanels and JComponents, but should have no heavyweight components as children. I've set up standalone applications that run one of the JApplets as a child of a JFrame, and those demos have no trouble. When I run the same demo but as a JApplet in a browser, I get errors. Please note that the demo is a JApplet but written like the demo that uses a JFrame, so the JApplet causing an issue is a child of the JApplet the browser knows about.
The issue is seen when the user mouses-over the child JApplet. The listener of the component being moused-over is trying to send an event that the LightweightDispatcher is erroring trying to retarget. It does not seem to find the component that should be receiving the event. For reference, the JApplet implements the mouse-listener interface and is set as the mouse-listener for all its children recursively. Here is the error that is seen:
Exception in thread "AWT-EventQueue-2" java.lang.AssertionError
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
and it repeats that for every mouse event that tries to fire within the child JApplet.
Any thoughts on what this could be?
I had a similar issue with key strokes not finding the focused JComponent within the child JApplet, but I made my own KeyboardEventManager to handle that issue. Unfortunately there are no paths like that to override for the mouse listeners, not to mention that there is no focused object for the events erroring.
I do see that when I stop adding the mouse-listeners then the error does not appear, so I'm sure its related to that.
I suppose the most important note here though is that the JApplets were built using Java 6, but the error is seen when running the JApplet with the 1.7 JRE. Also, the JApplet is opened using a JNLP. When the JNLP is set to run at 1.6+ the demo runs fine, when set to 1.7+, the error is seen.
Please let me know if anyone has seen this or has a solution, or if I should report this as a bug to Oracle.This shouldn't be the case. You did make sure you are pointing the applet at the plug in correct? That means you are using an <object> tag as opposed to the <applet> tag in the HTML file?
If not, run your HTML page through the HtmlConverter that comes with the plugin and try using the resulting HTML.
Bryan
Maybe you are looking for
-
I get the error "Cannot use adobe reader to view pdf in your web browser. Reader will now exit. Please exit your browser and try again" in Windows 7 x32 and Windows 7 x64 with Acrobat pro 8.1.7. This happens when trying to open a PDF file in Inte
-
I was just informed that I should start a new thread on this subject. I thought the other four threads would be enough - but whatever. Safari has gotten so bad in NOT QUITTING that I just got thru DELETING Safari completely. My only Browser is FIREFO
-
I added a mobile me gallery to a page in iweb 09 using the mm widget. the gallery displays fine using a computer browser, but in safari on the iphone the pictures dont appear. I have to create a seperate link to the gallery to get them to appear. any
-
Declaration of table in adobe form
hi, for the internal table declaration in adobe forms, have to use table type instead of structure. how to find out the table type for every structure
-
Hi, I wanted to create a button in Flash (invisible button) that is linked to a URL, but I want to be able to change the URL anytime I want. I've try using xml but somehow it's not working..Is there other way to do this? Thanks