FM: VHURM_HUBACKFLUSH_POST - External Commit
Dear all,
I use the FM VHURM_HUBACKFLUSH_POST in a program for production reporting. I want to backflush a bunch of HU´s corresponding to transaction MFHU (the import parameter P_SHOW_PROTOCOL is initial).
Furthermore I want to check if the backflush of all HU´s at once has been posted succesfully after the processing of the FM.
If the the backflush of all HU´s was successful make a commit if the backflush of at least one HU failed make a rollback for all HU´s to be backflushed and give the user an error message.
The issue is that the FM itself already triggers a commit internally.
Within the FM VHURM_HUBACKFLUSH_POST the FM RM_BACKFLUSH_GO is called which includes the subroutine backflush_end. This routine has the parameter am61b_ext_commit which controls if the commit should be triggered outwith the fm or not. I set this parameter in the debug mode and it worked. No backflush was executed until the commit was triggered by the calling program.
My question is now: Is it somehow possible to set this parameter outwith the FM VHURM_HUBACKFLUSH_POST already in the calling program? Any other ideas are also welcome.
Hi,
After calling the FM, try putting code like below.
IF sy-subrc = 0.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = space
AND RETURN.
ENDIF.
Similar Messages
-
BAPI_PROJETC_MAINTAIN - External Commit
Hi All,
I have created a custom function module using the SAP Standard Function module BAPI_PROJECT_MAINTAIN. This Custom Function module will be called from VB Interface. The while creating the Custom FM, I have commented the COMMIT WORK Statement which was the part of BAPI_PROJECT_MAINTAIN. I have done this because of the requirement of Commit to be called from the VB Interface.
I am calling the BAPI_TRANSACTION_COMMIT from my VB Code after I made a Call to my Custom FM and the Return Code of this Custom FM is a success.
The Return Code of this BAPI_TRANSACTION_COMMIT is also success, but the commit is not happenning, because when I go and check the PROJ Table, it has not created the Project.
Can soneone tell me why an external commit from another application is not working for this custom FM(Which is based on BAPI_PROJECT_MAINTAIN).
Thanks in Advance.Hi Sunil,
The first thing to do would be to create a test sequence in SE37, of first your custom function and then the BAPI_TRANSACTION_COMMIT. This executes the two functions one after the other in a single sequence. If this works, then you have a problem with your VB application.
In the VB application you should be calling your function and the commit within the one thread. So you should open a connection, call the function, and then call the commit bapi, before closing your connection. If you close the connection first, or call the commit in another thread, then the update wont occur.
You may find the following thread useful: Sales Order Create BAPI
Cheers,
Brad -
Hi all,
I have a problem with one software (no Oracle software), and sometimes happens that after a long time query it go to idle state, but that query ends OK. The only commit waiting for execute. But that software when does not responds.
Is there any way to commit some session from another session, or to connect to session and then do the commit.
Thanks a lot for your help.
Ales
Sorry for my poor English I hope that someone will understand my question.Ok I hoped that there is any way, but anyway Thank you for your answer.
This is the first time that on any forum somebody answer so early.
Thanks Ales -
FM with code to send a simple text mail to external ID
Hi All,
I need a FM with code if possible to send a simple text mail to an external e-mail id or distribution list. I tried using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 and was successfull in sending mail. But it requires attachment.
I need help to send mail without attachment with code.
All configurations done at my end.
Thanks
Anirban BhattacharjeeHi Anirban,
Please check this sample code.
* Email ITAB structure
DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF EMAIL_ITAB.
DATA: T_EMAIL LIKE SOOS1-RECEXTNAM. "EMail distribution list
CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
[email protected],[email protected].
* Initialization
REFRESH EMAIL_ITAB.
* Populate data
EMAIL_ITAB-LINE = Email body text 1.
APPEND EMAIL_ITAB.
EMAIL_ITAB-LINE = Email body text 2.
APPEND EMAIL_ITAB.
T_EMAIL = C_EMAIL_DISTRIBUTION.
* --- EMAIL FUNCTION ---------------------------------------------------
* REQUIRMENTS:
* 1) The user running the program needs a valid email address in their
* address portion of tx SU01 under external comms -> SMTP -> internet
* address.
* 2) A job called SAP_EMAIL is running with the following parameters:
* Program: RSCONN01 Variant: INT User: XXX
* This program moves mail from the outbox to the mail server using
* RFC destination: SAP_INTERNET_GATEWAY_SERVER
* INTERFACE:
* 1) APPLICATION: Anything
* 2) EMAILTITLE: EMail subject
* 3) RECEXTNAM: EMail distribution lists separated by commas
* 4) TEXTTAB: Internal table for lines of the email message
* EXCEPTIONS:
* Send OK = 0 otherwise there was a problem with the send.
CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
EXPORTING
APPLICATION = 'EMAIL'
EMAILTITLE = 'Email Subject'
RECEXTNAM = T_EMAIL
TABLES
TEXTTAB = EMAIL_ITAB
EXCEPTIONS
OTHERS = 1.
Function Z_SEND_EMAIL_ITAB
*"*"Local interface:
*" IMPORTING
*" VALUE(APPLICATION) LIKE SOOD1-OBJNAM
*" VALUE(EMAILTITLE) LIKE SOOD1-OBJDES
*" VALUE(RECEXTNAM) LIKE SOOS1-RECEXTNAM
*" TABLES
*" TEXTTAB STRUCTURE SOLI
*- local data declaration
DATA: OHD LIKE SOOD1,
OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
DATA: BEGIN OF RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF RECEIVERS.
*- fill odh
CLEAR OHD.
OHD-OBJLA = SY-LANGU.
OHD-OBJNAM = APPLICATION.
OHD-OBJDES = EMAILTITLE.
OHD-OBJPRI = 3.
OHD-OBJSNS = 'F'.
OHD-OWNNAM = SY-UNAME.
*- send Email
CONDENSE RECEXTNAM NO-GAPS.
CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
*- for every individual recipient send an Email
* (see OSS message 0120050409/0000362105/1999)
WHILE RECEXTNAM CS ','.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM+0(SY-FDPOS).
ADD 1 TO SY-FDPOS.
SHIFT RECEXTNAM LEFT BY SY-FDPOS PLACES.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDWHILE.
*- check last recipient in recipient list
IF RECEXTNAM <> SPACE.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDIF.
ENDFUNCTION.
* FORM SO_OBJECT_SEND_REC *
FORM SO_OBJECT_SEND_REC
TABLES OBJCONT STRUCTURE SOLI
RECEIVERS STRUCTURE SOOS1
USING OBJECT_HD STRUCTURE SOOD1.
DATA: OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
EXTERN_ADDRESS = 'X'
OBJECT_HD_CHANGE = OBJECT_HD
OBJECT_TYPE = 'RAW'
OUTBOX_FLAG = 'X'
SENDER = SY-UNAME
IMPORTING
OBJECT_ID_NEW = OID
SENT_TO_ALL = TO_ALL
OFFICE_OBJECT_KEY = OKEY
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC <> 0.
RAISE OTHERS.
ENDIF.
ENDFORM.
* FORM INIT_REC *
FORM INIT_REC TABLES RECEIVERS STRUCTURE SOOS1.
CLEAR RECEIVERS.
REFRESH RECEIVERS.
MOVE SY-DATUM TO RECEIVERS-RCDAT .
MOVE SY-UZEIT TO RECEIVERS-RCTIM.
MOVE '1' TO RECEIVERS-SNDPRI.
MOVE 'X' TO RECEIVERS-SNDEX.
MOVE 'U-' TO RECEIVERS-RECNAM.
MOVE 'U' TO RECEIVERS-RECESC.
MOVE 'INT' TO RECEIVERS-SNDART.
MOVE '5' TO RECEIVERS-SORTCLASS.
APPEND RECEIVERS.
ENDFORM.
Hope this will help.
Regards,
Ferry Lianto -
Why we cannot commit inside BAPI and what if we call workflow inside BAPI?
hi,
can anyone tell me why we cannot use Commit statement inside BAPI ?
Also what if in my BAPI ,i have triggered my workflow and through that can i commit??
Regards,
MayankHi,
it is a part of the BAPI programming model that BAPIs use a certain transaction model. This transaction model says that one BAPI has to follow the so called ACID (atomar, consistent, isolated, durable) principle. To ensure that a BAPI is atomar you cannot put a commit work just anywhere in mid of a BAPI as this would violate the modell. Furthermore BAPIs shall allow external commit handling that means it has to be possible to include several BAPI calls in one LUW. For this there are BAPIs which are only for committing or rolling back a transaction. For more detailed information you can check as usual the SAP help [click me|http://help.sap.com/saphelp_nw04/helpdata/EN/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm]
If would suppose that when you throw a workflow event it is triggered once the LUW is closed. At least SAP should work that way. But I have to admit in newer ABAP OO developments SAP often just calls the Event raising function module with the option to not wait for the DB commit. Seems there are some problems with the newer LUW concepts / OO and the old workflow technology. This can lead in worst case to events raised for objects which were rolled back later but SAP seems to accept that so it is in my oppinion an acceptable solution.
Hope that helps a bit
Roman -
Examples for using function modules and BApis.
My Dear FRNDS,
I am very new to ABAP. And I have read the documentation for function modules but i am not that clear to practice them.So I would be very happy if u people share a little bit of ur experience with me.
Please provide me some examples of all the use cases in function modules and specially exception handling.
Frnds, i am going to work with bapis so i feel practicing function module will give me a edge.
and please tell me after calling a BAPI FM why we have to perform 'BAPI_TRANSACTION_COMMIT' and 'BAPI_TRANSACTION_ROLLBACK'.
.Ur efforts will be greatly rewarded.
thx,
reshaliHi,
Please check this sample codes.
DATA: BAPI_Z05DOGI_DELIVERY LIKE BAPIOBDLVHDRCON-DELIV_NUMB ,
BAPI_Z05DOGI_HEADER_DATA LIKE BAPIOBDLVHDRCON OCCURS 0 WITH HEADER LINE ,
BAPI_Z05DOGI_HEADER_CONTROL LIKE BAPIOBDLVHDRCTRLCON OCCURS 0 WITH HEADER LINE,
BAPI_Z05DOGI_ITEM_DATA LIKE BAPIOBDLVITEMCON OCCURS 0 WITH HEADER LINE,
BAPI_Z05DOGI_ITEM_CONTROL LIKE BAPIOBDLVITEMCTRLCON OCCURS 0 WITH HEADER LINE ,
BAPI_Z05DOGI_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE .
CLEAR: BAPI_Z05DOGI_DELIVERY , BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA ,BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
REFRESH: BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA , BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
BAPI_Z05DOGI_DELIVERY = ZMM_WB1-ISSUE .
BAPI_Z05DOGI_HEADER_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
APPEND BAPI_Z05DOGI_HEADER_DATA.
BAPI_Z05DOGI_HEADER_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_HEADER_CONTROL-POST_GI_FLG = 'X'.
APPEND BAPI_Z05DOGI_HEADER_CONTROL.
BAPI_Z05DOGI_ITEM_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_ITEM_DATA-DELIV_ITEM = 10.
BAPI_Z05DOGI_ITEM_DATA-DLV_QTY = LFIMGGIA.
BAPI_Z05DOGI_ITEM_DATA-SALES_UNIT = XTAB-MEINS.
BAPI_Z05DOGI_ITEM_DATA-DLV_QTY_IMUNIT = LFIMGGIA.
BAPI_Z05DOGI_ITEM_DATA-FACT_UNIT_NOM = UMVKZLIPS.
BAPI_Z05DOGI_ITEM_DATA-FACT_UNIT_DENOM = UMVKNLIPS.
APPEND BAPI_Z05DOGI_ITEM_DATA.
BAPI_Z05DOGI_ITEM_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_ITEM_CONTROL-DELIV_ITEM = 10.
BAPI_Z05DOGI_ITEM_CONTROL-CHG_DELQTY = 'X'.
APPEND BAPI_Z05DOGI_ITEM_CONTROL.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
EXPORTING
DELIVERY = BAPI_Z05DOGI_DELIVERY
HEADER_DATA = BAPI_Z05DOGI_HEADER_DATA
HEADER_CONTROL = BAPI_Z05DOGI_HEADER_CONTROL
TABLES
ITEM_DATA = BAPI_Z05DOGI_ITEM_DATA
ITEM_CONTROL = BAPI_Z05DOGI_ITEM_CONTROL
RETURN = BAPI_Z05DOGI_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPI_Z05DOGI_RETURN.
Go thru this link
http://www.planetsap.com/LIST_ALL_BAPIs.htm
BAPI_TRANSACTION_COMMIT
Execute external Commit when using BAPIs
This method executes a COMMIT WORK command. It is required for
transactions developed externally to the R/3 System that change data in
the R/3 System via BAPI calls.
When you call BAPIs in your program that change data in the R/3 System,
afterwards you must call this method to write the changes to the
database.
COMMIT WORK
The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the currenta SAP LUW in the process
there are some FM that we use for creating trasaction . for example FM : that use for creating production order . if you execut the FM , the system will not create any data in the system so you need to excute the FM : BAPI_TRANSACTION_COMMIT to commit that creating the production order .
in case of commit work, that is a syntax in abap program . if you use this syntax after you insert ,update or delete table in the sap ,system will do it immediately otherwise the system will do it after execution is complete.
ROLLBACK WORK.
for confirming or undoing database updates. COMMIT WORK always concludes a database LUW and starts a new one. ROLLBACK WORK always undoes all changes back to the start of the database LUW.
Regards,
Raj. -
Hi,
I am working on AR Receipts converison in R12 and trying to create cash receipts using AR_RECEIPT_API_PUB.CREATE_CASH.
As per my data file there are 3 receipts that can be created successfully, but 1 receipt that has a couple of errors.
I dont want even a single receipt to be created in case any record in my data file fails.
I am passing the value fnd_api.g_false to the parameter p_commit. Still this doesn't help me to achieve what i require.
3 Receipts are automatically created, without issuing an external commit and 1 record/receipt failed with error.
Could you please help me with a solution on how to achieve this??? Appreciate your help.
Thanks in advance.
Regards,
KesavaHi,
I myself have figured out the problem.
I have digged in to the API Code and have found that FND_API.G_FALSE is case sensitive. I was passing it in lowercase earlier due to which the problem has arised.
It heps if we pass the value FND_API.G_FALSE in uppercase (or) even if we ignore that value it is fine as it is defaulting to the same.
Thanks,
Kesava Chunduri -
I work for a university and teach IT courses to undergrad and graduate students. The details below are pertaining an isolated lab environment
I had a storage failure in my lab and the DCs became corrupt. This is a university lab environment so there isn't anything crucial on here. I just would rather avoid rebuilding the domain/forest and would rather use this as a learning experience with my
students...
So after the storage failed and was restored, the VMs hosted became corrupt. I did a NTDSUTIL to basically repair the NDTS.dit file but one of my DCs reverted to a state before DC promotion. Naturally, the domain still had this object in AD. After numerous
failed attempts at trying to reinstall the DC on the server through the server manager wizard in 2012 R2, I decided that a metadata cleanup of the old failed object was necessary.
Utilizing this article, I removed all references of the failed DC from both AD and DNS (http://www.petri.com/delete_failed_dcs_from_ad.htm)
So now that the failed object is removed completely from the domain and the metadata cleanup was successful, I then proceeded to re-install the necessary AD DS role on the server and re-promote to the existing domain. Pre-Requisites pass but generate some
warning around DNS Delgation, and Dynamic Updates (delegation is ignored because the lab is isolated from external comms, and dynamic updates are in fact enabled on both my _msdcs and root domain zones).
Upon the promotion process, I get the following error message (also worth mentioning - the account performing these operations is a member of DA, EA, and Schema Admins)
The operation failed because:
Active Directory Domain Services could not create the NTDS Settings object for this Active Directory Domain Controller CN=NTDS Settings,CN=domainVMDC1,CN=Servers,CN=Default-
First-Site-Name,CN=Sites,CN=Configuration,DC=domain,DC=school,DC=edu on the remote AD DC domainVMDC2. Ensure the provided network credentials have sufficient permissions.
"While processing a change to the DNS Host Name for an object, the Service Principal Name values could not be kept in sync."
As you can see, this error seems odd considering. Now that I'm down to a single DC and DNS server, the sync should be corrected. I've run a repadmin /syncall and it completed successfully. Since then, I've run dcdiags and dumped those to a text as well and
here are my results...
Directory Server Diagnosis
Performing initial setup:
Trying to find home server...
Home Server = domainVMDC2
* Identified AD Forest.
Done gathering initial info.
Doing initial required tests
Testing server: Default-First-Site-Name\domainVMDC2
Starting test: Connectivity
......................... domainVMDC2 passed test Connectivity
Doing primary tests
Testing server: Default-First-Site-Name\domainVMDC2
Starting test: Advertising
......................... domainVMDC2 passed test Advertising
Starting test: FrsEvent
......................... domainVMDC2 passed test FrsEvent
Starting test: DFSREvent
......................... domainVMDC2 passed test DFSREvent
Starting test: SysVolCheck
......................... domainVMDC2 passed test SysVolCheck
Starting test: KccEvent
......................... domainVMDC2 passed test KccEvent
Starting test: KnowsOfRoleHolders
......................... domainVMDC2 passed test KnowsOfRoleHolders
Starting test: MachineAccount
......................... domainVMDC2 passed test MachineAccount
Starting test: NCSecDesc
......................... domainVMDC2 passed test NCSecDesc
Starting test: NetLogons
......................... domainVMDC2 passed test NetLogons
Starting test: ObjectsReplicated
......................... domainVMDC2 passed test ObjectsReplicated
Starting test: Replications
......................... domainVMDC2 passed test Replications
Starting test: RidManager
......................... domainVMDC2 passed test RidManager
Starting test: Services
......................... domainVMDC2 passed test Services
Starting test: SystemLog
A warning event occurred. EventID: 0x00001795
Time Generated: 12/18/2014 00:35:03
Event String:
The program lsass.exe, with the assigned process ID 476, could not authenticate locally by using the target name ldap/domainvmdc2.domain.school.edu. The target name used is not valid. A target name should
refer to one of the local computer names, for example, the DNS host name.
......................... domainVMDC2 passed test SystemLog
Starting test: VerifyReferences
......................... domainVMDC2 passed test VerifyReferences
Running partition tests on : ForestDnsZones
Starting test: CheckSDRefDom
For the partition
(DC=ForestDnsZones,DC=domain,DC=school,DC=edu) we encountered
the following error retrieving the cross-ref's
(CN=3098109a-ff99-41d4-8926-0e814ac8efde,CN=Partitions,CN=Configuration,DC=domain,DC=school,DC=edu)
information:
LDAP Error 0x52e (1326).
......................... ForestDnsZones failed test CheckSDRefDom
Starting test: CrossRefValidation
For the partition
(DC=ForestDnsZones,DC=domain,DC=school,DC=edu) we encountered
the following error retrieving the cross-ref's
(CN=3098109a-ff99-41d4-8926-0e814ac8efde,CN=Partitions,CN=Configuration,DC=domain,DC=school,DC=edu)
information:
LDAP Error 0x52e (1326).
......................... ForestDnsZones failed test
CrossRefValidation
Running partition tests on : DomainDnsZones
Starting test: CheckSDRefDom
For the partition
(DC=DomainDnsZones,DC=domain,DC=school,DC=edu) we encountered
the following error retrieving the cross-ref's
(CN=2f0b8ac0-2630-441a-891f-b5fcb91498a8,CN=Partitions,CN=Configuration,DC=domain,DC=school,DC=edu)
information:
LDAP Error 0x52e (1326).
......................... DomainDnsZones failed test CheckSDRefDom
Starting test: CrossRefValidation
For the partition
(DC=DomainDnsZones,DC=domain,DC=school,DC=edu) we encountered
the following error retrieving the cross-ref's
(CN=2f0b8ac0-2630-441a-891f-b5fcb91498a8,CN=Partitions,CN=Configuration,DC=domain,DC=school,DC=edu)
information:
LDAP Error 0x52e (1326).
......................... DomainDnsZones failed test
CrossRefValidation
Running partition tests on : Schema
Starting test: CheckSDRefDom
......................... Schema passed test CheckSDRefDom
Starting test: CrossRefValidation
For the partition
(CN=Schema,CN=Configuration,DC=domain,DC=school,DC=edu) we
encountered the following error retrieving the cross-ref's
(CN=Enterprise Schema,CN=Partitions,CN=Configuration,DC=domain,DC=school,DC=edu)
information:
LDAP Error 0x52e (1326).
......................... Schema failed test CrossRefValidation
Running partition tests on : Configuration
Starting test: CheckSDRefDom
......................... Configuration passed test CheckSDRefDom
Starting test: CrossRefValidation
For the partition
(CN=Configuration,DC=domain,DC=school,DC=edu) we encountered
the following error retrieving the cross-ref's
(CN=Enterprise Configuration,CN=Partitions,CN=Configuration,DC=domain,DC=school,DC=edu)
information:
LDAP Error 0x52e (1326).
......................... Configuration failed test CrossRefValidation
Running partition tests on : domain
Starting test: CheckSDRefDom
......................... domain passed test CheckSDRefDom
Starting test: CrossRefValidation
For the partition (DC=domain,DC=school,DC=edu) we encountered
the following error retrieving the cross-ref's
(CN=domain,CN=Partitions,CN=Configuration,DC=domain,DC=school,DC=edu)
information:
LDAP Error 0x52e (1326).
......................... domain failed test CrossRefValidation
Running enterprise tests on : domain.school.edu
Starting test: LocatorCheck
......................... domain.school.edu passed test
LocatorCheck
Starting test: Intersite
......................... domain.school.edu passed test Intersite
From what I can gather, there is a definite DNS issue but I don't have any stale records to the old DC stored anywhere. I've tried this with a new server as well and get similar errors...
At this rate I'm ready to rebuild the entire forest over again. I'm just reluctant to do so as I want to make this a learning experience for the students.
Any help would be greatly appreciated. Thanks!As you can see, there seems to be some errors. The one that I did correct was the one around the _msdcs NS record being unable to resolve. For whatever, reason the name wasn't resolving the IP but all other NS tabs and records were. Just that one _msdcs
sub-zone. Furthermore, the mentioning of any connections to root hint servers can be viewed as false positives. There is no external comms to this lab so no communication with outside IPs can be expected. Lastly, they mentioned a connectivity issue yet mention
that I should check the firewall settings. All three profiles are disabled in Windows Firewall (as they have been the entire time). Thank you in advance for your help!
C:\Windows\system32>dcdiag /test:dns /v
Directory Server Diagnosis
Performing initial setup:
Trying to find home server...
* Verifying that the local machine domainVMDC2, is a Directory Server.
Home Server = domainVMDC2
* Connecting to directory service on server domainVMDC2.
* Identified AD Forest.
Collecting AD specific global data
* Collecting site info.
Calling ldap_search_init_page(hld,CN=Sites,CN=Configuration,DC=domain,DC=school,DC=edu,LDAP_SCOPE_SUBTREE,(objectCategory=ntDSSiteSettings),.......
The previous call succeeded
Iterating through the sites
Looking at base site object: CN=NTDS Site Settings,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=domain,DC=school,DC=edu
Getting ISTG and options for the site
* Identifying all servers.
Calling ldap_search_init_page(hld,CN=Sites,CN=Configuration,DC=domain,DC=school,DC=edu,LDAP_SCOPE_SUBTREE,(objectClass=ntDSDsa),.......
The previous call succeeded....
The previous call succeeded
Iterating through the list of servers
Getting information for the server CN=NTDS Settings,CN=domainVMDC2,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=domain,DC=school,DC=edu
objectGuid obtained
InvocationID obtained
dnsHostname obtained
site info obtained
All the info for the server collected
* Identifying all NC cross-refs.
* Found 1 DC(s). Testing 1 of them.
Done gathering initial info.
Doing initial required tests
Testing server: Default-First-Site-Name\domainVMDC2
Starting test: Connectivity
* Active Directory LDAP Services Check
The host
3a38b19c-4bb3-4542-acb6-9e5e97cc15c4._msdcs.domain.school.edu
could not be resolved to an IP address. Check the DNS server, DHCP,
server name, etc.
Got error while checking LDAP and RPC connectivity. Please check your
firewall settings.
......................... domainVMDC2 failed test Connectivity
Doing primary tests
Testing server: Default-First-Site-Name\domainVMDC2
Test omitted by user request: Advertising
Test omitted by user request: CheckSecurityError
Test omitted by user request: CutoffServers
Test omitted by user request: FrsEvent
Test omitted by user request: DFSREvent
Test omitted by user request: SysVolCheck
Test omitted by user request: KccEvent
Test omitted by user request: KnowsOfRoleHolders
Test omitted by user request: MachineAccount
Test omitted by user request: NCSecDesc
Test omitted by user request: NetLogons
Test omitted by user request: ObjectsReplicated
Test omitted by user request: OutboundSecureChannels
Test omitted by user request: Replications
Test omitted by user request: RidManager
Test omitted by user request: Services
Test omitted by user request: SystemLog
Test omitted by user request: Topology
Test omitted by user request: VerifyEnterpriseReferences
Test omitted by user request: VerifyReferences
Test omitted by user request: VerifyReplicas
Starting test: DNS
DNS Tests are running and not hung. Please wait a few minutes...
See DNS test in enterprise tests section for results
......................... domainVMDC2 passed test DNS
Running partition tests on : ForestDnsZones
Test omitted by user request: CheckSDRefDom
Test omitted by user request: CrossRefValidation
Running partition tests on : DomainDnsZones
Test omitted by user request: CheckSDRefDom
Test omitted by user request: CrossRefValidation
Running partition tests on : Schema
Test omitted by user request: CheckSDRefDom
Test omitted by user request: CrossRefValidation
Running partition tests on : Configuration
Test omitted by user request: CheckSDRefDom
Test omitted by user request: CrossRefValidation
Running partition tests on : domain
Test omitted by user request: CheckSDRefDom
Test omitted by user request: CrossRefValidation
Running enterprise tests on : domain.school.edu
Starting test: DNS
Test results for domain controllers:
DC: domainVMDC2
Domain: domain.school.edu
TEST: Authentication (Auth)
Authentication test: Successfully completed
TEST: Basic (Basc)
Error: No LDAP connectivity
The OS
Microsoft Windows Server 2012 R2 Datacenter (Service Pack level: 0.0)
is supported.
NETLOGON service is running
kdc service is running
DNSCACHE service is running
DNS service is running
DC is a DNS server
Network adapters information:
Adapter [00000010] vmxnet3 Ethernet Adapter:
MAC address is 00:50:56:A2:2C:24
IP Address is static
IP address: *.*.100.26
DNS servers:
*.*.100.26 (domainVMDC2) [Valid]
No host records (A or AAAA) were found for this DC
The SOA record for the Active Directory zone was found
The Active Directory zone on this DC/DNS server was found primary
Root zone on this DC/DNS server was not found
TEST: Forwarders/Root hints (Forw)
Recursion is enabled
Forwarders are not configured on this DNS server
Root hint Information:
Name: a.root-servers.net. IP: 198.41.0.4 [Invalid (unreachable)]
Name: b.root-servers.net. IP: 192.228.79.201 [Invalid (unreachable)]
Name: c.root-servers.net. IP: 192.33.4.12 [Invalid (unreachable)]
Name: d.root-servers.net. IP: 199.7.91.13 [Invalid (unreachable)]
Name: e.root-servers.net. IP: 192.203.230.10 [Invalid (unreachable)]
Name: f.root-servers.net. IP: 192.5.5.241 [Invalid (unreachable)]
Name: g.root-servers.net. IP: 192.112.36.4 [Invalid (unreachable)]
Name: h.root-servers.net. IP: 128.63.2.53 [Invalid (unreachable)]
Name: i.root-servers.net. IP: 192.36.148.17 [Invalid (unreachable)]
Name: j.root-servers.net. IP: 192.58.128.30 [Invalid (unreachable)]
Name: k.root-servers.net. IP: 193.0.14.129 [Invalid (unreachable)]
Name: l.root-servers.net. IP: 199.7.83.42 [Invalid (unreachable)]
Name: m.root-servers.net. IP: 202.12.27.33 [Invalid (unreachable)]
Error: Both root hints and forwarders are not configured or
broken. Please make sure at least one of them works.
TEST: Delegations (Del)
Delegation information for the zone: domain.school.edu.
Delegated domain name: _msdcs.domain.school.edu.
Error: DNS server: domainvmdc2. IP:<Unavailable>
[Missing glue A record]
[Error details: 9714 (Type: Win32 - Description: DNS name does not exist.)]
TEST: Dynamic update (Dyn)
Test record dcdiag-test-record added successfully in zone domain.school.edu
Warning: Failed to delete the test record dcdiag-test-record in zone domain.school.edu
[Error details: 13 (Type: Win32 - Description: The data is invalid.)]
TEST: Records registration (RReg)
Network Adapter [00000010] vmxnet3 Ethernet Adapter:
Matching CNAME record found at DNS server *.*.100.26:
3a38b19c-4bb3-4542-acb6-9e5e97cc15c4._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.a9241004-88ea-422d-a71e-df7b622f0d68.domains._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_kerberos._tcp.dc._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.dc._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_kerberos._tcp.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_kerberos._udp.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_kpasswd._tcp.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.Default-First-Site-Name._sites.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_kerberos._tcp.Default-First-Site-Name._sites.dc._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_kerberos._tcp.Default-First-Site-Name._sites.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.gc._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_gc._tcp.Default-First-Site-Name._sites.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.Default-First-Site-Name._sites.gc._msdcs.domain.school.edu
Matching SRV record found at DNS server *.*.100.26:
_ldap._tcp.pdc._msdcs.domain.school.edu
Error: Record registrations cannot be found for all the network
adapters
Summary of test results for DNS servers used by the above domain
controllers:
DNS server: 128.63.2.53 (h.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 128.63.2.53
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 192.112.36.4 (g.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 192.112.36.4
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 192.203.230.10 (e.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 192.203.230.10
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 192.228.79.201 (b.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 192.228.79.201
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 192.33.4.12 (c.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 192.33.4.12
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 192.36.148.17 (i.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 192.36.148.17
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 192.5.5.241 (f.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 192.5.5.241
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 192.58.128.30 (j.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 192.58.128.30
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 193.0.14.129 (k.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 193.0.14.129
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 198.41.0.4 (a.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 198.41.0.4
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 199.7.83.42 (l.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 199.7.83.42
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 199.7.91.13 (d.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 199.7.91.13
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: 202.12.27.33 (m.root-servers.net.)
1 test failure on this DNS server
PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DNS server 202.12.27.33
[Error details: 1460 (Type: Win32 - Description: This operation returned because the timeout period expired.)]
DNS server: *.*.100.26 (domainVMDC2)
All tests passed on this DNS server
Name resolution is functional._ldap._tcp SRV record for the forest root domain is registered
Summary of DNS test results:
Auth Basc Forw Del Dyn RReg Ext
Domain: domain.school.edu
domainVMDC2 PASS FAIL FAIL FAIL WARN FAIL n/a
......................... domain.school.edu failed test DNS
Test omitted by user request: LocatorCheck
Test omitted by user request: Intersite -
Unable to start OBIEE 11g Sevices on Windows 7
Hello,
I have successfully installed OBIEE 11g server on windows machine 64 bit
When I start BI services from all programs I get following error :
SVR_GRP =
JAVA Memory arguments: -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:-UseSSE42Intr
insics
WLS Start Mode=Production
CLASSPATH=C:\MWH\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\MWH\Oracle
BI1\bifoundation\jdbc\jdk16\bijdbc.jar;;C:\MWH\patchwls1035\profiles\default\s
ys_manifest_classpath\weblogic_patch.jar;C:\MWH\ORACLE~2\jdk\lib\tools.jar;C:\MW
H\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\MWH\WLSERV~1.3\server\lib\weblogic.ja
r;C:\MWH\modules\features\weblogic.server.modules_10.3.5.0.jar;C:\MWH\WLSERV~1.3
\server\lib\webservices.jar;C:\MWH\modules\ORGAPA~1.1/lib/ant-all.jar;C:\MWH\mod
ules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\MWH\wlserver_10.3\server\lib\weblogic.j
ar;C:\MWH\oracle_common\modules\oracle.dms_11.1.1\dms.jar;C:\MWH\oracle_common\m
odules\oracle.jmx_11.1.1\jmxframework.jar;C:\MWH\oracle_common\modules\oracle.jm
x_11.1.1\jmxspi.jar;C:\MWH\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;C:\M
WH\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\MWH\ORACLE~1\soa\modules\oracle.s
oa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\MWH\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.
jar;C:\MWH\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\MWH\WLSERV~1.3\server\
lib\xqrl.jar
PATH=C:\MWH\patch_wls1035\profiles\default\native;C:\MWH\WLSERV~1.3\server\nativ
e\win\x64;C:\MWH\WLSERV~1.3\server\bin;C:\MWH\modules\ORGAPA~1.1\bin;C:\MWH\ORAC
LE~2\jdk\jre\bin;C:\MWH\ORACLE~2\jdk\bin;C:\Program Files\Java\jdk1.7.0_13\bin;C
:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Windows\system32;C:\Windows;C
:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\MWH\Oracl
e_BI1\products\Essbase\EssbaseServer\bin;C:\MWH\Oracle_BI1\bin;C:\MWH\Oracle_BI1
\opmn\bin;C:\MWH\Oracle_BI1\opmn\lib;C:\MWH\Oracle_BI1\perl\bin;C:\Program Files
\Java\jre7\bin;C:\Program Files\Java\jdk1.7.0_13\bin ;C:\Program Files\Java\jdk1
.7.0_13\bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Windows\system32
;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
;C:\MWH\Oracle_BI1\products\Essbase\EssbaseServer\bin;C:\MWH\Oracle_BI1\bin;C:\M
WH\Oracle_BI1\opmn\bin;C:\MWH\Oracle_BI1\opmn\lib;C:\MWH\Oracle_BI1\perl\bin;C:\
Program Files\Java\jre7\bin;;C:\MWH\WLSERV~1.3\server\native\win\x64\oci920_8
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\hostname:port\console *
starting weblogic with Java version:
'C:\MWH\ORACLE~2\jdk\bin\java' is not recognized as an internal or external comm
and,
operable program or batch file.
Starting WLS with line:
C:\MWH\ORACLE~2\jdk\bin\java -server -Xms256m -Xmx1024m -XX:MaxPermSize=512m -
XX:-UseSSE42Intrinsics -Dweblogic.Name=AdminServer -Djava.security.policy=C:\MWH
\WLSERV~1.3\server\lib\weblogic.policy -Dweblogic.ProductionModeEnabled=true -D
oracle.home=C:\MWH\Oracle_BI1 -da -Dplatform.home=C:\MWH\WLSERV~1.3 -Dwls.home=
C:\MWH\WLSERV~1.3\server -Dweblogic.home=C:\MWH\WLSERV~1.3\server -Dcommon.comp
onents.home=C:\MWH\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Lo
g=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\MWH\USER_P~1\doma
ins\BIFOUN~1 -Djrockit.optfile=C:\MWH\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket
optfile.txt -Doracle.server.config.dir=C:\MWH\USERP~1\domains\BIFOUN~1\config\
FMWCON~1\servers\AdminServer -Doracle.domain.config.dir=C:\MWH\USER_P~1\domains\
BIFOUN~1\config\FMWCON~1 -Digf.arisidbeans.carmlloc=C:\MWH\USER_P~1\domains\BIF
OUN~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\MWH\USER_P~1\domains\BIFO
UN~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\MWH\USER_P~1
\domains\BIFOUN~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\M
WH\USER_P~1\domains\BIFOUN~1\servers\AdminServer\tmp\_WL_user -Doracle.deployed.
app.ext=\- -Dweblogic.alternateTypesDirectory=C:\MWH\ORACLE~1\modules\oracle.oss
oiap_11.1.1,C:\MWH\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Djava.protocol.ha
ndler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dbi.ora
cle.home=C:\MWH\Oracle_BI1 -DEPM_ORACLE_HOME=C:\MWH\Oracle_BI1 -Dweblogic.MaxMes
sageSize=50000000 -DEPM_ORACLE_HOME=C:\MWH\Oracle_BI1 -DHYPERION_HOME=C:\MWH\Ora
cle_BI1 -DEPM_ORACLE_INSTANCE=novalue -Dhyperion.home=C:\MWH\Oracle_BI1 -DEPM_RE
G_PROPERTIES_PATH=C:\MWH\USER_P~1\domains\BIFOUN~1\config\fmwconfig -Depm.useApp
licationContextId=false -Doracle.biee.search.bisearchproperties=C:\MWH\Oracle_BI
1\bifoundation\jee\BISearchConfig.properties -Dweblogic.management.clearTextCred
entialAccessEnabled=true -Doracle.notification.filewatching.interval=2000 -Dwebl
ogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.SSL.enable
JSSE=true -Dfile.encoding=utf-8 -Doracle.ecsf.security.service=oracle.biee.searc
h.security.BISearchSecurityService -Doracle.ecsf.configuration.class=oracle.biee
.search.services.BISearchServiceConfiguration -Dxdo.server.config.dir=C:\MWH\use
r_projects\domains\bifoundation_domain\config\bipublisher -DXDO_FONT_DIR=C:\MWH\
Oracle_BI1\common\fonts -Drtd.instanceName=RTD_AdminServer -Dem.oracle.home=C:\
MWH\oracle_common -Djava.awt.headless=true -Dweblogic.management.discover=true
-Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false
-Dweblogic.ext.dirs=C:\MWH\patch_wls1035\profiles\default\sysext_manifest_classp
ath weblogic.Server
'C:\MWH\ORACLE~2\jdk\bin\java' is not recognized as an internal or external comm
and,
operable program or batch file.
C:\MWH>
I have installed OBIEE 11.1.1.6.0 version and Java version
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Any suggestions ?? Where am I going wrong ??faisalm wrote:
'C:\MWH\ORACLE~2\jdk\bin\java' is not recognized as an internal or external comm
and,
operable program or batch file.Check your environment variables and make sure your java/bin path is correct.
go to command prompt and type in SET PATH
C:\MWH\ORACLE~2\jdk should be java home
Make sure path is C:\MWH\ORACLE~2\jdk\bin;
HTH,
SVS -
Update a record that has not been completely inserted in database
Hi,
I have the following requirement, that I wonder which is the best solution for this:
- in QM02, add a new task in header level, means add a new record in table QMSM
- in the meantime, make this new task completed as well.
For adding a new task, I use FM 'IQS4_ADD_DATA_NOTIFICATION'.
To complete a task, I use FM 'BAPI_QUALNOT_CHANGETSKSTAT'.
But I have to commit after each FM's calling in order the 2 FMs take effect. This is not consistent because if a new task has been added successfully, who can be sure that the 2nd FM to change it status will be successfully committed, which will lead to the new task status is not completed.
I intended to insert new task and update it in memory ( SET UPDATE TASK LOCAL ), but it doesn't work, or may be I do not know how to use it correctly.
Do you have any suggestions ?
Thanks,
PaulFirstly, a very happy new year to you!
I am assuming that those two functions don't do their own COMMIT WORK. You can confirm that by calling them in debugger and seeing if they make database changes without calling external COMMIT.
In such a case you can put both the function calls inside a update function module (set Update Module attribute with Start immediately set in SE37 -> Attributes) and call that update function IN UPDATE TASK. Before calling the update task function you can execute SET UPDATE TASK LOCAL to ensure that the update task is executed within the current LUW. After the update function module call, you can do a COMMIT WORK. The function called IN UPDATE TASK will execute when COMMIT WORK is encountered.
Within the update function module you should not call a COMMIT and neither should both of the functions. If an error is returned from any of those two function calls, you can raise a TYPE E message within your update function call - this will raise a "EXPRESS DOCUMENT :UPDATE WAS TERMINATED" message and a ROLLBACK will occur. Also you can only EXPORT to and pass TABLES to an function executed IN UPDATE TASK, you CAN'T IMPORT from or raise EXCEPTIONS. This is because an update task is executed only during COMMIT WORK statement and is no longer connected to user other than through Express document message protocol. So you can't return any information back to the calling program
This way you can achieve what you want - ensuring that database update through COMMIT only happens if both the functions return success and if any of them don't return success then ROLLBACK will happen, ensuring no database changes happen -
Hello All,
I am working on a SOAP to SOAP (Backend as ECC where I am exposing an RFC as Web Service). Once the Web service is generated for RFC and the WSDL is imported in PI, I can see that all the fields in different nodes become mandatory.
Is it how normally Web Service for BAPI works or can this behaviour (mandatory / optional) be controlled ?
Also when I execute the end to end scenario via SOAP UI, I don't get any error back but also neither get the Return table nor the Sales Order NO. I am using the BAPI BAPI_SALESORDER_CREATEFROMDAT2.
Can it be because of no COMMIT (The BAPI uses external commit although this reason seems less likely as executing a RFC wo any commit atleast gives me a Sales Order no) ?
How can this call be analysed in backend ECC system ? (As I assume that messages will not be visible in SXMB_MONI as explained by the Harald's thread below. I am currently in process of getting authorization of SOAMANAGER logs but wondering how it'll help?
Thanking you in advance.
SOAP to SOAP scenario: XML messages not visible in SXMB_MONI
Cheers
KanesIHi,
Please see the SOAP ststud..
http://<host>:5<sys#>00/mdt/amtServlet
also you might check any error logs.
The error is because of invalid xml document. So check the validity of the xml message ie. after first mapping i.e Req mapping.
For this you can refer this -
http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
See the below links
Also this blog may help you-/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
Could not post a SOAP request to the interface
Message Servlet is in Status ERROR
Error while posting messages to SOAP sender adapter SP 13
http://localhost:50000/XISOAPAdapter/HelperServlet?action=FindChannel&channel=PartyA:SOAPService:soapchannel
SOAP Adapter in PCK
Regards
Chilla.. -
hi
For payment advise , i have done configurtion in BTE to send mail to vendor. When i chkd the mail , there is no attachment found. Is it necessary to apply note 1033893 . If nt necessary what may be problem?
Is there any changes to be done in FM SAMPLE_PROCESS_00002040? If any expert explain the process of sending mail in detail using BTE, it will be more useful.
Thanks in advanceHi,
ABAP CODE
Email ITAB structure
DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF EMAIL_ITAB.
DATA: T_EMAIL LIKE SOOS1-RECEXTNAM. "EMail distribution list
CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
Initialization
REFRESH EMAIL_ITAB.
Populate data
EMAIL_ITAB-LINE = u2018Email body text 1u2019.
APPEND EMAIL_ITAB.
EMAIL_ITAB-LINE = u2018Email body text 2u2019.
APPEND EMAIL_ITAB.
T_EMAIL = C_EMAIL_DISTRIBUTION.
--- EMAIL FUNCTION ---------------------------------------------------
REQUIRMENTS:
1) The user running the program needs a valid email address in their
address portion of tx SU01 under external comms -> SMTP -> internet
address.
2) A job called SAP_EMAIL is running with the following parameters:
Program: RSCONN01 Variant: INT User: XXX
This program moves mail from the outbox to the mail server using
RFC destination: SAP_INTERNET_GATEWAY_SERVER
INTERFACE:
1) APPLICATION: Anything
2) EMAILTITLE: EMail subject
3) RECEXTNAM: EMail distribution lists separated by commas
4) TEXTTAB: Internal table for lines of the email message
EXCEPTIONS:
Send OK = 0 otherwise there was a problem with the send.
CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
EXPORTING
APPLICATION = 'EMAIL'
EMAILTITLE = 'Email Subject'
RECEXTNAM = T_EMAIL
TABLES
TEXTTAB = EMAIL_ITAB
EXCEPTIONS
OTHERS = 1.
Function Z_SEND_EMAIL_ITAB
""Local interface:
*" IMPORTING
*" VALUE(APPLICATION) LIKE SOOD1-OBJNAM
*" VALUE(EMAILTITLE) LIKE SOOD1-OBJDES
*" VALUE(RECEXTNAM) LIKE SOOS1-RECEXTNAM
*" TABLES
*" TEXTTAB STRUCTURE SOLI
*- local data declaration
DATA: OHD LIKE SOOD1,
OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
DATA: BEGIN OF RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF RECEIVERS.
*- fill odh
CLEAR OHD.
OHD-OBJLA = SY-LANGU.
OHD-OBJNAM = APPLICATION.
OHD-OBJDES = EMAILTITLE.
OHD-OBJPRI = 3.
OHD-OBJSNS = 'F'.
OHD-OWNNAM = SY-UNAME.
*- send Email
CONDENSE RECEXTNAM NO-GAPS.
CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
*- for every individual recipient send an Email
(see OSS message 0120050409/0000362105/1999)
WHILE RECEXTNAM CS ','.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM+0(SY-FDPOS).
ADD 1 TO SY-FDPOS.
SHIFT RECEXTNAM LEFT BY SY-FDPOS PLACES.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDWHILE.
*- check last recipient in recipient list
IF RECEXTNAM <> SPACE.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDIF.
ENDFUNCTION.
FORM SO_OBJECT_SEND_REC *
FORM SO_OBJECT_SEND_REC
TABLES OBJCONT STRUCTURE SOLI
RECEIVERS STRUCTURE SOOS1
USING OBJECT_HD STRUCTURE SOOD1.
DATA: OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
EXTERN_ADDRESS = 'X'
OBJECT_HD_CHANGE = OBJECT_HD
OBJECT_TYPE = 'RAW'
OUTBOX_FLAG = 'X'
SENDER = SY-UNAME
IMPORTING
OBJECT_ID_NEW = OID
SENT_TO_ALL = TO_ALL
OFFICE_OBJECT_KEY = OKEY
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC <> 0.
RAISE OTHERS.
ENDIF.
ENDFORM.
FORM INIT_REC *
FORM INIT_REC TABLES RECEIVERS STRUCTURE SOOS1.
CLEAR RECEIVERS.
REFRESH RECEIVERS.
MOVE SY-DATUM TO RECEIVERS-RCDAT .
MOVE SY-UZEIT TO RECEIVERS-RCTIM.
MOVE '1' TO RECEIVERS-SNDPRI.
MOVE 'X' TO RECEIVERS-SNDEX.
MOVE 'U-' TO RECEIVERS-RECNAM.
MOVE 'U' TO RECEIVERS-RECESC.
MOVE 'INT' TO RECEIVERS-SNDART.
MOVE '5' TO RECEIVERS-SORTCLASS.
APPEND RECEIVERS.
endform.
pls chk this links. they have some threds they may solve your problem
BTE-process 2040 email payment advice to Vendors
Business Transaction Event
http://help.sap.com/saphelp_nw04/helpdata/en/08/48f340dda3702ae10000000a155106/frameset.htm
thanks
karthik -
How to send a mail to a person from after completeing bdc .
Hi Xperts,
Please send me a options how to send a mail to a person after completing a bdc or from any report program.
mailed can be a sapuser or other service provider(ex:yahoo,gmail.any thing)
Please Any one i want it now .
Thank You.FUNCTION RS_SEND_MAIL_FOR_SPOO* Email ITAB structure
DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF EMAIL_ITAB.
DATA: T_EMAIL LIKE SOOS1-RECEXTNAM. "EMail distribution list
CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
[email protected],[email protected].
Initialization
REFRESH EMAIL_ITAB.
Populate data
EMAIL_ITAB-LINE = Email body text 1.
APPEND EMAIL_ITAB.
EMAIL_ITAB-LINE = Email body text 2.
APPEND EMAIL_ITAB.
T_EMAIL = C_EMAIL_DISTRIBUTION.
--- EMAIL FUNCTION ---------------------------------------------------
REQUIRMENTS:
1) The user running the program needs a valid email address in their
address portion of tx SU01 under external comms -> SMTP -> internet
address.
2) A job called SAP_EMAIL is running with the following parameters:
Program: RSCONN01 Variant: INT User: XXX
This program moves mail from the outbox to the mail server using
RFC destination: SAP_INTERNET_GATEWAY_SERVER
INTERFACE:
1) APPLICATION: Anything
2) EMAILTITLE: EMail subject
3) RECEXTNAM: EMail distribution lists separated by commas
4) TEXTTAB: Internal table for lines of the email message
EXCEPTIONS:
Send OK = 0 otherwise there was a problem with the send.
CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
EXPORTING
APPLICATION = 'EMAIL'
EMAILTITLE = 'Email Subject'
RECEXTNAM = T_EMAIL
TABLES
TEXTTAB = EMAIL_ITAB
EXCEPTIONS
OTHERS = 1.
Function Z_SEND_EMAIL_ITAB
""Local interface:
*" IMPORTING
*" VALUE(APPLICATION) LIKE SOOD1-OBJNAM
*" VALUE(EMAILTITLE) LIKE SOOD1-OBJDES
*" VALUE(RECEXTNAM) LIKE SOOS1-RECEXTNAM
*" TABLES
*" TEXTTAB STRUCTURE SOLI
*- local data declaration
DATA: OHD LIKE SOOD1,
OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
DATA: BEGIN OF RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF RECEIVERS.
*- fill odh
CLEAR OHD.
OHD-OBJLA = SY-LANGU.
OHD-OBJNAM = APPLICATION.
OHD-OBJDES = EMAILTITLE.
OHD-OBJPRI = 3.
OHD-OBJSNS = 'F'.
OHD-OWNNAM = SY-UNAME.
*- send Email
CONDENSE RECEXTNAM NO-GAPS.
CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
*- for every individual recipient send an Email
(see OSS message 0120050409/0000362105/1999)
WHILE RECEXTNAM CS ','.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM+0(SY-FDPOS).
ADD 1 TO SY-FDPOS.
SHIFT RECEXTNAM LEFT BY SY-FDPOS PLACES.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDWHILE.
*- check last recipient in recipient list
IF RECEXTNAM <> SPACE.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDIF.
ENDFUNCTION.
FORM SO_OBJECT_SEND_REC *
FORM SO_OBJECT_SEND_REC
TABLES OBJCONT STRUCTURE SOLI
RECEIVERS STRUCTURE SOOS1
USING OBJECT_HD STRUCTURE SOOD1.
DATA: OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
EXTERN_ADDRESS = 'X'
OBJECT_HD_CHANGE = OBJECT_HD
OBJECT_TYPE = 'RAW'
OUTBOX_FLAG = 'X'
SENDER = SY-UNAME
IMPORTING
OBJECT_ID_NEW = OID
SENT_TO_ALL = TO_ALL
OFFICE_OBJECT_KEY = OKEY
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC <> 0.
RAISE OTHERS.
ENDIF.
ENDFORM.
FORM INIT_REC *
FORM INIT_REC TABLES RECEIVERS STRUCTURE SOOS1.
CLEAR RECEIVERS.
REFRESH RECEIVERS.
MOVE SY-DATUM TO RECEIVERS-RCDAT .
MOVE SY-UZEIT TO RECEIVERS-RCTIM.
MOVE '1' TO RECEIVERS-SNDPRI.
MOVE 'X' TO RECEIVERS-SNDEX.
MOVE 'U-' TO RECEIVERS-RECNAM.
MOVE 'U' TO RECEIVERS-RECESC.
MOVE 'INT' TO RECEIVERS-SNDART.
MOVE '5' TO RECEIVERS-SORTCLASS.
APPEND RECEIVERS.
ENDFORM.
2. -
Hi all.
I need BDC code for MM01,i need to populate values depending upon "Material type",Because view changing depending upon material type.
please give me code for that.
To be reward all helpfull answers.
Regards.
jayHi,
This is a BDC for MM for T-code MM01.I hope this will help u.
Below is the coding.
Reward if helpful.
Regards,
Seevangi
REPORT ZMMBDC_MATERIAL_MASTER_UPD
LINE-SIZE 255 NO STANDARD PAGE HEADING LINE-COUNT 65.
Tables
Structure declaration
Work Variables and internal tables
Constants
Parameters
Events: Start-Of-Selection
data : begin of i_mara occurs 0,
matnr like mara-matnr,
end of i_mara.
data : begin of ty_matdata,
matnr like mara-matnr, "material number
mbrsh like rmmg1-mbrsh, "Industry sector
mtart like rmmg1-mtart, "Material Type
werks like rmmg1-werks, "Plant
lgort like rmmg1-lgort, "Storage Location
vkorg like rmmg1-vkorg, "Sales Organization
vtweg like rmmg1-vtweg, "Distribution Channel
maktx like makt-maktx, "Material Description (Short Text)
meins like mara-meins, "Base Unit of Measure
matkl like mara-matkl, "Material Group
bismt like mara-bismt, "Old material number
spart like mara-spart, "Division
brgew(15) ," like mara-brgew, "Gross Weight
ntgew(15), " like mara-ntgew, "Net Weight
ekgrp like marc-ekgrp, "Purchasing Group
gewei like mara-gewei, "Weight Unit
klart like rmclf-klart, "Class Type
taxkm like MG03STEUER-TAXKM, "Tax classification material
ladgr like marc-ladgr, "Loading Group
tragr like mara-tragr, "Transportation Group
dismm like marc-dismm, "MRP Type
dispo like marc-dispo, "MRP Controller (Materials Planner)
fhori like marc-fhori, "Scheduling margin key
disls like marc-disls, " lot size
prmod like mpop-prmod, "Forecast model
peran(3)," like mpop-peran, "Number of historical periods
anzpr(3)," like mpop-anzpr, "Number of forecast periods
kzini like mpop-kzini, "Initialization indicator
siggr(9)," like mpop-siggr, "Tracking limit
autru like marc-autru, "Reset Forecast Model Automatically
modav like mpop-modav, "Model selection procedure
perkz like marc-perkz, "Period Indicator
verpr(13), " like mbew-verpr, "Moving Average Price/Periodic Unit Price
prctr like marc-prctr, "Profit Center
mtvfp like marc-mtvfp, "Checking Group for Availability Check
bklas like mbew-bklas, "Valuation Class
vprsv like mbew-vprsv, "Price control indicator
stprs(13) ," like mbew-stprs, "Standard price
peinh(5) ,"like mbew-peinh, "Price Unit
end of ty_matdata,
begin of ty_matdata1,
matnr like mara-matnr, "material number
mbrsh like rmmg1-mbrsh, "Industry sector
mtart like rmmg1-mtart, "Material Type
werks like rmmg1-werks, "Plant
lgort like rmmg1-lgort, "Storage Location
vkorg like rmmg1-vkorg, "Sales Organization
vtweg like rmmg1-vtweg, "Distribution Channel
maktx like makt-maktx, "Material Description (Short Text)
meins like mara-meins, "Base Unit of Measure
matkl like mara-matkl, "Material Group
bismt like mara-bismt, "Old material number
spart like mara-spart, "Division
brgew(15) ," like mara-brgew, "Gross Weight
ntgew(15), " like mara-ntgew, "Net Weight
ekgrp like marc-ekgrp, "Purchasing Group
gewei like mara-gewei, "Weight Unit
klart like rmclf-klart, "Class Type
taxkm like MG03STEUER-TAXKM, "Tax classification material
ladgr like marc-ladgr, "Loading Group
tragr like mara-tragr, "Transportation Group
dismm like marc-dismm, "MRP Type
dispo like marc-dispo, "MRP Controller (Materials Planner)
fhori like marc-fhori, "Scheduling margin key
prmod like mpop-prmod, "Forecast model
peran(3)," like mpop-peran, "Number of historical periods
anzpr(3)," like mpop-anzpr, "Number of forecast periods
kzini like mpop-kzini, "Initialization indicator
siggr(9)," like mpop-siggr, "Tracking limit
autru like marc-autru, "Reset Forecast Model Automatically
modav like mpop-modav, "Model selection procedure
perkz like marc-perkz, "Period Indicator
verpr(13), " like mbew-verpr, "Moving Average Price/Periodic Unit Price
prctr like marc-prctr, "Profit Center
mtvfp like marc-mtvfp, "Checking Group for Availability Check
bklas like mbew-bklas, "Valuation Class
vprsv like mbew-vprsv, "Price control indicator
stprs(13) ," like mbew-stprs, "Standard price
peinh(5) ,"like mbew-peinh, "Price Unit
message like bapiret2-message, "Error Message.
end of ty_matdata1,
begin of ty_error,
matnr like mara-matnr,
mbrsh like rmmg1-mbrsh, "Industry sector
mtart like rmmg1-mtart, "Material Type
werks like rmmg1-werks, "Plant
message like bapiret2-message,
end of ty_error.
Data Begin with W_ *
data : i_matdata like standard table of ty_matdata with header line.
BAPIMATHEAD - Header Segment with Control Information
data : i_headdata like bapimathead occurs 0 with header line.
bapi_makt - Material Descriptions.
data : i_bapi_makt like bapi_makt occurs 0 with header line.
*bapi_mlan - Tax data
data : i_bapi_mlan like bapi_mlan occurs 0 with header line.
bapi_mara - Material Data at Client Level.
data : i_clientdata like bapi_mara occurs 0 with header line.
bapi_marax - Checkbox Structure for BAPI_MARA.
data : i_clientdatax like bapi_marax occurs 0 with header line.
bapi_marc - Material Data at Plant Level.
data : i_plantdata like bapi_marc occurs 0 with header line.
bapi_marcx - Checkbox Structure for BAPI_MARA.
data : i_plantdatax like bapi_marcx occurs 0 with header line.
BAPI_MARD - Material Data at Storage Location Level.
data : i_storagelocationdata like bapi_mard occurs 0 with header line.
bapi_mardx - Checkbox Structure for BAPI_MARD
data : i_storagelocationdatax like bapi_mardx occurs 0 with header line.
*bapi_mpop - Forecast Parameters
data : i_forcastingparameter like BAPI_MPOP occurs 0 with header line.
*bapi_mpopx - Checkbox Structure for BAPI_MPOP
data : i_forcastingparameterx like BAPI_MPOPX occurs 0 with header line.
*bapi_mbew - Valuation Data
data : i_valuationdata like BAPI_MBEW occurs 0 with header line.
*bapi_mbewx - Checkbox Structure for BAPI_MBEW
data : i_valuationdatax like BAPI_MBEWX occurs 0 with header line.
*bapi_mvke - Sales Data
data : i_salesdata like BAPI_MVKE occurs 0 with header line.
*bapi_mvkex - Checkbox Structure for BAPI_MVKE
data : i_salesdatax like BAPI_MVKEX occurs 0 with header line.
bapiret2 - Return parameter
data : i_return like bapiret2 occurs 0 with header line.
Errors displayed on screen.
data : i_error like standard table of ty_error with header line.
*Error data to be loaded after correction.
data : i_matdata1 like standard table of ty_matdata1 with header line.
*bapi_marm - Unit of measure
data : i_bapi_marm like bapi_marm occurs 0 with header line.
*bapi_marmx - unit of measurex
data : i_bapi_marmx like bapi_marmx occurs 0 with header line.
To determine error.
data : w_flg(1).
S E L E C T I O N S C R E E N / P A R A M E T E R S
selection-screen: begin of block b1 with frame.
parameters: p_file like rlgrap-filename obligatory.
selection-screen: end of block b1.
selection-screen skip 1.
selection-screen: begin of block b2 with frame.
parameters: p_file1 like rlgrap-filename .
selection-screen: end of block b2.
A T S E L E C T I O N S C R E E N
at selection-screen on value-request for p_file.
WS_FILENAME_GET - Determination of a file name on the presentation
server using a file selection dialog.
call function 'WS_FILENAME_GET'
exporting
def_filename = '*.TXT'
def_path = 'C:\'
mask = ',.TXT,.*.'
mode = 'O'
TITLE = ' '
importing
filename = p_file
RC =
exceptions
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
others = 5
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
T O P O F P A G E *
top-of-page.
skip.
write : /01 'Material Number', 30 'Error Message'.
S T A R T O F S E L E C T I O N
start-of-selection.
perform read_data.
perform create_material.
perform display_error.
*& Form read_data
text
--> p1 text
<-- p2 text
form read_data.
Uploads a file from the presentation server into an internal table.
call function 'WS_UPLOAD'
exporting
codepage = 'IBM'
filename = p_file
filetype = 'DAT'
tables
data_tab = i_matdata
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10.
if sy-subrc <> 0.
write:/ 'File Not Uploaded'.
endif.
endform. " read_data
*& Form create_material
text
--> p1 text
<-- p2 text
form create_material.
loop at i_matdata.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = i_matdata-matnr
IMPORTING
OUTPUT = i_matdata-matnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = i_matdata-prctr
IMPORTING
OUTPUT = i_matdata-prctr
*select matnr from mara into table i_mara .
*sort i_mara by matnr descending.
*read table i_mara index 1.
*i_mara-matnr = i_mara-matnr + 1.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = i_mara-matnr
IMPORTING
OUTPUT = i_mara-matnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = i_matdata-matnr
IMPORTING
OUTPUT = i_matdata-matnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
i_headdata-material = i_matdata-matnr.
i_headdata-material = i_mara-matnr.
i_headdata-ind_sector = i_matdata-mbrsh.
i_headdata-matl_type = i_matdata-mtart.
i_headdata-basic_view = 'X'.
i_headdata-mrp_view = 'X'.
i_headdata-storage_view = 'X'.
i_headdata-SALES_VIEW = 'X'.
i_headdata-PURCHASE_VIEW = 'X'.
i_headdata-FORECAST_VIEW = 'X'.
i_headdata-ACCOUNT_VIEW = 'X'.
i_headdata-COST_VIEW = 'X'.
i_headdata-prt_view = 'X'.
i_headdata-work_sched_view = 'X'.
i_headdata-quality_view = 'X'.
append i_headdata.
clear i_headdata.
i_bapi_makt-langu = sy-langu.
i_bapi_makt-matl_desc = i_matdata-maktx.
append i_bapi_makt.
clear i_bapi_makt.
i_clientdata-matl_group = i_matdata-matkl.
i_clientdata-old_mat_no = i_matdata-bismt.
i_clientdata-base_uom = i_matdata-meins.
i_clientdata-division = i_matdata-spart.
i_clientdata-UNIT_OF_WT = i_matdata-gewei.
i_clientdata-TRANS_GRP = i_matdata-tragr.
i_clientdata-NET_WEIGHT = i_matdata-ntgew.
append i_clientdata.
clear i_clientdata.
i_clientdatax-matl_group = 'X'.
i_clientdatax-old_mat_no = 'X'.
i_clientdatax-base_uom = 'X'.
i_clientdatax-division = 'X'.
i_clientdatax-UNIT_OF_WT = 'X'.
i_clientdatax-TRANS_GRP = 'X'.
i_clientdatax-NET_WEIGHT = 'X'.
append i_clientdatax.
clear i_clientdatax.
i_plantdata-plant = i_matdata-werks.
i_plantdata-mrp_type = i_matdata-dismm.
i_plantdata-mrp_ctrler = i_matdata-dispo.
i_plantdata-availcheck = i_matdata-mtvfp.
i_plantdata-profit_ctr = i_matdata-prctr.
i_plantdata-LOADINGGRP = i_matdata-ladgr.
i_plantdata-PUR_GROUP = i_matdata-ekgrp.
i_plantdata-AUTO_RESET = i_matdata-autru.
i_plantdata-PERIOD_IND = i_matdata-perkz.
i_plantdata-MRP_CTRLER = i_matdata-dispo.
i_plantdata-SM_KEY = i_matdata-fhori.
i_plantdata-LOTSIZEKEY = i_matdata-disls.
append i_plantdata.
clear i_plantdata.
i_plantdatax-plant = i_plantdata-plant.
i_plantdatax-mrp_type = 'X'.
i_plantdatax-mrp_ctrler = 'X'.
i_plantdatax-availcheck = 'X' .
i_plantdatax-profit_ctr = 'X' .
i_plantdatax-LOADINGGRP = 'X' .
i_plantdatax-PUR_GROUP = 'X' .
i_plantdatax-AUTO_RESET = 'X'.
i_plantdatax-PERIOD_IND = 'X'.
i_plantdatax-MRP_CTRLER = 'X'.
i_plantdatax-SM_KEY = 'X'.
i_plantdatax-LOTSIZEKEY = 'X'.
append i_plantdatax.
clear i_plantdatax.
clear i_forcastingparameter.
i_forcastingparameter-PLANT = i_matdata-werks.
i_forcastingparameter-HIST_VALS = i_matdata-peran.
i_forcastingparameter-FORE_PDS = i_matdata-anzpr.
i_forcastingparameter-INITIALIZE = i_matdata-kzini.
i_forcastingparameter-TRACKLIMIT = i_matdata-siggr.
i_forcastingparameter-MODEL_SP = i_matdata-modav.
i_forcastingparameter-FORE_MODEL = i_matdata-prmod.
append i_forcastingparameter.
clear i_forcastingparameterx.
i_forcastingparameterx-PLANT = i_matdata-werks.
i_forcastingparameterx-HIST_VALS = 'X'.
i_forcastingparameterx-FORE_PDS = 'X'.
i_forcastingparameterx-INITIALIZE = 'X'.
i_forcastingparameterx-TRACKLIMIT = 'X'.
i_forcastingparameterx-MODEL_SP = 'X'.
i_forcastingparameterx-FORE_MODEL = 'X'.
append i_forcastingparameterx.
i_valuationdata-MOVING_PR = i_matdata-verpr.
i_valuationdata-STD_PRICE = i_matdata-stprs.
i_valuationdata-PRICE_CTRL = i_matdata-VPRSV.
i_valuationdata-VAL_CLASS = i_matdata-bklas.
i_valuationdata-PRICE_UNIT = i_matdata-peinh.
i_valuationdata-VAL_AREA = i_matdata-werks.
append i_valuationdata.
i_valuationdatax-VAL_AREA = i_matdata-werks.
i_valuationdatax-MOVING_PR = 'X'.
i_valuationdatax-STD_PRICE = 'X'.
i_valuationdatax-PRICE_CTRL = 'X'.
i_valuationdatax-VAL_CLASS = 'X'.
i_valuationdatax-PRICE_UNIT = 'X'.
append i_valuationdatax.
i_salesdata-SALES_ORG = i_matdata-vkorg.
i_salesdata-DISTR_CHAN = i_matdata-vtweg.
i_salesdata-DELY_UOM = i_matdata-meins.
append i_salesdata.
i_salesdatax-SALES_ORG = i_matdata-vkorg.
i_salesdatax-DISTR_CHAN = i_matdata-vtweg.
i_salesdata-DELY_UOM = 'X'.
append i_salesdatax.
i_bapi_marm-ALT_UNIT = i_matdata-meins.
i_bapi_marm-GROSS_WT = i_matdata-brgew.
append i_bapi_marm.
i_storagelocationdata-plant = i_plantdatax-plant.
i_storagelocationdata-stge_loc = i_matdata-lgort.
append i_storagelocationdata.
clear i_storagelocationdata.
i_storagelocationdatax-plant = i_plantdatax-plant.
i_storagelocationdatax-stge_loc = i_storagelocationdata-stge_loc.
append i_storagelocationdatax.
clear i_storagelocationdatax.
i_bapi_mlan-TAXCLASS_1 = i_matdata-TAXKM.
append i_bapi_mlan.
BAPI - BAPI_MATERIAL_SAVEDATA is used to Create and Change Material
Master Data.
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
headdata = i_headdata
clientdata = i_clientdata
clientdatax = i_clientdatax
plantdata = i_plantdata
plantdatax = i_plantdatax
FORECASTPARAMETERS = i_forcastingparameter
FORECASTPARAMETERSX = i_forcastingparameterx
PLANNINGDATA =
PLANNINGDATAX =
storagelocationdata = i_storagelocationdata
storagelocationdatax = i_storagelocationdatax
VALUATIONDATA = i_valuationdata
VALUATIONDATAX = i_valuationdatax
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = i_salesdata
SALESDATAX = i_salesdatax
STORAGETYPEDATA =
STORAGETYPEDATAX =
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
importing
return = i_return
tables
materialdescription = i_bapi_makt
UNITSOFMEASURE = i_bapi_marm
UNITSOFMEASUREX = i_bapi_marmx
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS = i_bapi_mlan
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
if i_return-type = 'E'.
i_error-matnr = i_mara-matnr.
i_error-mbrsh = i_matdata-mbrsh.
i_error-mtart = i_matdata-mtart.
i_error-werks = i_matdata-werks.
i_error-message = i_return-message.
append i_error.
clear i_error.
w_flg = 'X'.
*else.
Execute external Commit when using BAPIs
When you call BAPIs in your program that change data in the R/3
System afterwards you must call this method to write the changes to *
the database.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = i_return
endif.
refresh : i_headdata , i_bapi_makt, i_clientdata, i_clientdatax ,
i_plantdata, i_plantdatax,
i_storagelocationdata,i_storagelocationdatax,
i_salesdata , i_salesdatax ,
i_valuationdata , i_valuationdatax,
i_bapi_marm,i_bapi_marmx,
i_bapi_mlan.
clear : i_headdata , i_bapi_makt, i_clientdata, i_clientdatax ,
i_plantdata, i_plantdatax, i_storagelocationdata,
i_storagelocationdatax,
i_valuationdata , i_valuationdatax,
i_bapi_marm,i_bapi_marmx,
i_bapi_mlan.
endloop.
endform. " create_material
*& Form display_error
text
--> p1 text
<-- p2 text
form display_error.
loop at i_error.
read table i_matdata with key matnr = i_error-matnr.
if sy-subrc = 0.
i_matdata1-matnr = i_mara-matnr.
i_matdata1-mbrsh = i_matdata-mbrsh.
i_matdata1-mtart = i_matdata-mtart.
i_matdata1-maktx = i_matdata-maktx.
i_matdata1-meins = i_matdata-meins.
i_matdata1-matkl = i_matdata-matkl.
i_matdata1-bismt = i_matdata-bismt.
i_matdata1-zeinr = i_matdata-zeinr.
i_matdata1-spart = i_matdata-spart.
i_matdata1-werks = i_matdata-werks.
i_matdata1-dismm = i_matdata-dismm.
i_matdata1-dispo = i_matdata-dispo.
i_matdata1-beskz = i_matdata-beskz.
i_matdata1-sobsl = i_matdata-sobsl.
i_matdata1-lgpro = i_matdata-lgpro.
i_matdata1-lgfsb = i_matdata-lgfsb.
i_matdata1-eprio = i_matdata-eprio.
i_matdata1-mtvfp = i_matdata-mtvfp.
i_matdata1-lgort = i_matdata-lgort.
i_matdata1-lgpbe = i_matdata-lgpbe.
i_matdata1-prctr = i_matdata-prctr.
i_matdata1-message = i_error-message.
append i_matdata1.
clear i_matdata1.
endif.
endloop.
loop at i_error.
write :/01 i_error-matnr , 30 i_error-message.
endloop.
if i_error is initial.
write :/01 text-001.
endif.
if w_flg = 'X'.
call function 'WS_DOWNLOAD'
exporting
BIN_FILESIZE = ' '
codepage = 'IBM'
filename = p_file1
filetype = 'DAT'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
tables
data_tab = i_error
FIELDNAMES =
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endif.
endform. " display_error7 -
Inbound IDOC Mass processing - No status message
Hi Friends,
I am updating a database table using inbound IDOC. But in batch job when XI passes multiple IDOCS,
for some IDOCs there is no status message even though i coded for status message.
If i rerun IDOC in BD87 then it work fine.
please help.
regards,
madanHi Madan,
Since you are loading multiple idoc to the system due to high load in the production system data is not commiting properly. So use external commit work statement in you code. this will reduce the performance but logic will work.
COMMIT WORK [AND WAIT].
Effect
The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the current SAP LUW in the process. In this case, COMMIT WORK performs the following actions:
It executes all subroutines registered using PERFORM ON COMMIT.
The sequence is based on the order of registration or according to the priority specified using the LEVEL addition. Execution of the following statements is not permitted in a subroutine of this type:
PERFORM ... ON COMMIT|ROLLBACK
COMMIT WORK
ROLLBACK WORK
The statement CALL FUNCTION ... IN UPDATE TASK can be executed.
Triggering an internal event for the Persistence Service of the Object Services.
If event handlers are registered by the Persistence Service, these collect the changes to the objects managed by the Persistence Service and transfer them via CALL FUNCTION ... IN UPDATE TASK to a specific update function module that is registered as the last update module.
This executes all high-priority (VB1) update function modules in the order of their registration and in a common database LUW. If you do not specify the addition AND WAIT, the program does not wait until the update work process has executed it (asynchronous updating), but instead is resumed immediately after COMMIT WORK. However, if the addition AND WAIT is specified, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating).
When all high-priority update function modules are completed successfully, the statement executes the low-priority (VB2) update function modules in the order of registration together in a common database LUW.
After the execution of high-priority update function modules, the individual function modules registered using CALL FUNCTION ...IN BACKGROUND TASK|UNIT are executed in a separate database LUW for each destination.
Within an update function module started using COMMIT WORK, the execution of statements that lead to a database commit is not permitted. In particular, the following are forbidden:
Thanks,
Raghav
Maybe you are looking for
-
IPhoto 6 and Spotlight - the ANSWER
Hi, I had some problems with iPhoto 6 and Spotlight indexing. After reading tons of posts and not finding answers that worked, I ended up learning about Spotlight myself. The solution is as simple as it is embarrassing (for Apple). They simply forgot
-
Query Related to Oracle Inventory
I have to prepare a report in Oracle Inventory (R12) where I have to extract below fields 1. Inventory Quantity Sold for previous days and weekly basis etc 2. Quantity Physically on a shelf at a distribution center but commited to end customer 3. Qua
-
File Drag and Drop in Portfolio
Is there any way to enable scrolling when dragging and dropping files into a folder that was created inside a Portfolio in the List View? When converting multiple files from folders, users want to maintain the organization of the files in the same f
-
Net info manager, Help Needed
Good Morning all I have a Mac that is on my network and I am trying to get it to connect to a web server, so I can do some browser testing. It will connect OK if I use the IP in the browser. But not when I try and use Net info manager This works fine
-
Ipod touch 3rd generation calendar sync problems.
I have just updated my IPod Touch 3G to Software version 5.1.1. The calendar has been synced and all entries, including those in Outlook itself, not just the IPod, have been erased from 12 months ago. The calendar sync is to Outlook. Fortunately this