Provisioning HR data
Hi Experts,
I am new to IdM implementation and my scenario is as follows.
New employee data will be exported from HCM system to IdM via VDS. Then, for each new employee, user account need to be created in an different target systems(both SAP and Non-SAP). Along with the user creation, initial roles need to be assigned to the user based on some conditions specific to each target system.
Using the configuration guide for SAP Systems, I have done the export of HR data to the staging area identity store and then to the productive identity store. But then, I don't know how to proceed with user creation provisioning to the target systems.
Please help me on the best practices on how to trigger the provisioning tasks in this case?
Regards,
Vijay.K
Hi Frank
How we can check if the user data have been successfully moved from HCM staging area to the productive Identity Store ?
>Then the normal provisioning process gets triggered.
How ? For this does we need to do any specific configuration?
Hi Matt,
Did you mean the document "SAP NetWeaver® Identity Management
Identity Center
Tutorial
- Working with roles and privileges
Version" ?
Is there any other document?
Thank you.
Regards
Sahad
Similar Messages
-
Error provisioning a date with DBATconnector
hi,
in the configuration of DBAT connector there is a field called: Target Date Format .
in the table the format date is DD-MMM-RR .
so in the Target Date Format i put the format dd-MMM-yy and whe i try to provision this is the error:
[2012-09-07T13:26:58.275-05:00] [oim_server1] [ERROR] [] [OIMCP.DATC] [tid: [ACTIVE].ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: XELSYSADM] [ecid: e48b78a1878c940d:686a49f6:139a0315189:-8000-000000000000b644,0] [APP: oim#11.1.1.3.0] Class/Method: DBProvisioningTransportProvider/sendData encounter some problems: DB_SQLOBJECT_ERROR[[
com.thortech.xl.gc.exception.DBException: DB_SQLOBJECT_ERROR
at com.thortech.xl.gc.impl.common.DBFacade.getSQLObject(Unknown Source)
at com.thortech.xl.gc.impl.common.DBFacade.updateParentRecord(Unknown Source)
at com.thortech.xl.gc.impl.prov.DBProvisioningTransportProvider.sendData(Unknown Source)
at com.thortech.xl.gc.runtime.GCAdapterLibrary.executeFunctionality(GCAdapterLibrary.java:574)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpTB_BAN26_MAS_2_GTC.GENERICADAPTER(adpTB_BAN26_MAS_2_GTC.java:125)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpTB_BAN26_MAS_2_GTC.implementation(adpTB_BAN26_MAS_2_GTC.java:70)
at com.thortech.xl.client.events.tcBaseEvent.run(tcBaseEvent.java:196)
at com.thortech.xl.dataobj.tcDataObj.runEvent(tcDataObj.java:2492)
at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(tcScheduleItem.java:2919)
at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(tcScheduleItem.java:553)
at com.thortech.xl.dataobj.tcDataObj.insert(tcDataObj.java:602)
at com.thortech.xl.dataobj.tcDataObj.save(tcDataObj.java:474)
at com.thortech.xl.dataobj.tcOrderItemInfo.eventPostUpdate(tcOrderItemInfo.java:374)
at com.thortech.xl.dataobj.tcDataObj.update(tcDataObj.java:664)
at com.thortech.xl.dataobj.tcDataObj.save(tcDataObj.java:508)
at com.thortech.xl.dataobj.tcTableDataObj.save(tcTableDataObj.java:2906)
at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(tcFormInstanceOperationsBean.java:710)
at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(tcFormInstanceOperationsBean.java:426)
at Thor.API.Operations.tcFormInstanceOperationsIntfEJB.setProcessFormDatax(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5891.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy388.setProcessFormDatax(Unknown Source)
at Thor.API.Operations.tcFormInstanceOperationsIntfEJB_h6wb8n_tcFormInstanceOperationsIntfRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at Thor.API.Operations.tcFormInstanceOperationsIntfEJB_h6wb8n_tcFormInstanceOperationsIntfRemoteImpl.setProcessFormDatax(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
at $Proxy187.setProcessFormDatax(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5890.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy386.setProcessFormDatax(Unknown Source)
at Thor.API.Operations.tcFormInstanceOperationsIntfDelegate.setProcessFormData(Unknown Source)
at com.thortech.xl.webclient.actions.UserDefinedFormAction.editForm(UserDefinedFormAction.java:2033)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)
at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(tcLookupDispatchAction.java:133)
at com.thortech.xl.webclient.actions.tcActionBase.execute(tcActionBase.java:894)
at com.thortech.xl.webclient.actions.tcAction.execute(tcAction.java:213)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1914)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:463)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at com.thortech.xl.webclient.security.CSRFFilter.doFilter(CSRFFilter.java:78)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:122)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:109)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.text.ParseException: Unparseable date: "07-Sep-12"_
at java.text.DateFormat.parse(DateFormat.java:337)
... 103 more
thank you .!!!oh I thought of recon. Yes, you have to supply the same date format which is defined in Target Date Format for provisioning. can you update target date format as dd-mmm-yy. Even the given format is same, try once
even verify the parameter Database Date Format parameter for provisioning. It should also have the same value as Target Date Format -
Hello all,
first, sorry for the (I hope ;-) simple question, but I'm a total OIM newbie.
I installed OIM 9.0.1 on a linux machine. On an other linux machine there is an openLDAP directory.
Now in a first step, I just want to provision user data from the oim to the ldap.
How can I handle this. Do I need a connector? Or do I have to make changes on my oim???
Thank you very much for your help.
GreetingsDownload and install the sun one directory connector. Update the lookup that defines all the provisioning properties to match that of your open ldap.
I would like to help you more, but you need to get some sort of base knowledge before we can answer much of your questions.
For starters, i would use the latest OIM, which is 9.1.0.1. Your version is very old.
-Kevin -
Urgent:Regarding data reconsilation
HI all,
1. i have PSFT as trusted source and EBS as target source. now when we connect to this sources by using out-of-the-box connectors which is already avilable,what it will ask while installing connectors and which tables it is going to connect?
2.i have a requirement that i need get the data related to users from diff tables of PSFT and need to provision that data in diff tables of EBS,wether we need to fulfill this by using predefind connectors or we need to use custom connetors?
if possible please give me the steps for the above queries.
please help me out in this
thanks for your time
Regards
sivaPSFT needs profile to be set at PSFT for the data and EBS has queries in the properties file with the connector. Installation does not in itself does anything but you will have to configure the connectors post installation as per your requirement. My suggestion would be to go through the connector docs to understand the architecture and feasibility.
HTH,
BB -
Question re switching data off abroad but using Wi-Fi
I bought an 8900, as it had wi-fi, and I had assumed when I switched data off when roaming, I would be able to use wi-fi to connect to the internet.
Just tried an experiment at home, and switched data off under mobile network options, connected to my home network via wi-fi, and tried to use my browser. I then got an error message saying couldn't connect to the internet.
Is there anyway to accomplish what I am trying to do? I use Gmail for mail, so had assumed I'd be able to switch off my data package while roaming, and just connect to Gmail via the web using wi-fi when abroad.
TIAyes... absolutely yess... it will work i tried it and it works... switched off my Mobile Network(GSM) and tried to connect on a wifi hotspot voila! i can send & received email use all BB Application such as BB Mesenger and Yahoo messenger,
Now the question is "switching data off abroad but using Wi-Fi" yes it should work and it is documented Accessing BlackBerry Data Services Using Wi-Fi Networks
All you need is an internet connection thru WIFI
1. A Wi-Fi connection profile must be added for each hotspot or home Wi-Fi network.
Wi-Fi connection profiles can easily be configured via the Set Up Wi-Fi wizard. The
correct service set identifier (SSID), security type, security key or credentials are
necessary for this configuration. Additionally, hotspot users may need to have
additional credentials or agree to the hotspot provider’s terms and conditions for use.
These can be entered when using the Set Up Wi-Fi wizard.
2. In most cases, no other additional configuration will be necessary. Once connected,
authenticated, and authorized to use the hotspot or home Wi-Fi network, all
provisioned BlackBerry data services should be available. This is accomplished by
establishing an SSL connection via port 443 to the BlackBerry Infrastructure
but one thing im not sure if the data plan or packages are consumed also or does it affect my BIS data plan
For hotspot or home Wi-Fi network users -
Change Password Provisioning to AD fails
OIM 9.0.3 is used for provisioning user data to AD. The OIM Administrative and User Console is customized to be a helpdesk UI for administrators and self-service UI for normal users. A user ID that is in a System Administrator User Group logins into the OIM Administrative and User Console, it is able to see all administrative tasks, e.g. user management, whereas a user ID that is in a All User Group logins into the same console, it can only see My Account->Change Password.
Here are two Change Password processes that we want to have in our system.
1. Administrator changes password by clicking the 'Change Password' button in the User Details' page. Password can be changed in the OIM database and the new password will be provisioned to AD, i.e. an AD attribute 'unicodepwd'. It works fine in this process.
2. Normal user changes password by clicking the 'Change Password' in 'My Account'. The new password cannot be provisioned to AD successfully. Actually there is even no write operation in the AD, as the value of 'whenChanged' attribute is never changed if we try to change a user password in a self-service UI.
This is quite strange, as we configured two special tasks in Process Definition in Design Console, i.e. 'Change User Password' and 'User Password Updated', we also added an entry in Lookup.USR_PROCESS_TRIGGERS as: CODE Key=USR_PASSWORD, Decode: Change User Password. Process 1 works, whereas process 2 does not.
I found some other similar posts in the forum, but none of them had such a problem. Whenever there is an update in OIM, the change should be provisioned to the AD. I don't think it matters where the user's password is changed, correct? But it doesn't work! Anyone has ever met this issue before? Thanks!The transport of a changed password from the USR form to AD is a two step process.
First you trigger a task that moves the new password from the USR form to the AD process form. This is done by Lookup.USR_PROCESS_TRIGGERS.
In step two you move the password from the AD process form to AD. This process is triggered by a naming convention. Any task called "<LABEL> updated" will be triggered if the <LABEL> field on the process form is updated.
If you change the name of your AD process form -> AD task to "Password Updated" it will trigger.
The "cascading" part of the password change process is the same no matter how the password change was initiated.
Best regards
/M
Message was edited by:
Martin_Sandren
The "X Updated" taskname should be written with a capital U. -
Provisioning Groups into FIM 2010 from oracle database
Greetings,
I am trying to provision security groups from an oracle database where i have a view that contains:
Department_Code
Department_Name
DepParent_Code
The view has a recursive relation between Department_Code and DepParent_Code (1 to many).
The view will lead to a Tree that has departments and sub-departments, i want to provision this data into FIM then to AD as security groups reserving the same hierarchy.
Any help would be appreciated.
Mohamad ChahlaI have done something like this myself. Using my approach I would do the following:
Extend the Group and group resource type schema in FIM and the FIM Metaverse respectively, adding a new REFERENCE attribute binding ParentGroup/parentGroup respectively;
Create an Oracle MA for importing DEPARTMENT objects with the anchor attribute Department_Code and with DepParent_Code declared as type REFERENCE;
Create an inbound sync rule to import department objects as GROUP objects, with IAFs as follows:
'DEPT-' + Department_Code => group.displayName
Department_Name => group.description
DepParent_Code => group.parentGroup
... and other IAFs according to the instructions you will find
here;
Either create your FIM groups as static (easy), or dynamic/query based (harder - i.e. you would do this if each Person object had a string binding of Department with values which exactly match the DEPT data you are importing) by using an appropriate MPR/workflow;
Define an outbound sync rule to
synchronise your FIM group objects to AD.
If creating dynamic groups, your new workflow "Set Department Group Filter' can be created by using the Function Evaluator to construct the necessary XML filter value (create a group manually first to determine what this must look like) such that each
group has a matching filter, e.g. the filter for DEPT-ABC would be /Person[Department='ABC']
Bob Bradley (FIMBob @
TheFIMTeam.com) ... now using FIM Event Broker for just-in-time delivery of FIM 2010 policy via the sync engine, and continuous compliance for FIM -
I am sorry nhylo this your answer I hope it will help you
MAC OS
iMac
There are several versions of the iMac computer. The first two versions (referred to as revision A and revision B) were colored Bondi Blue. The next version (referred to as revision C) was introduced in January 1999 and came in five different colors.
Revision A and B iMac computers support IrDA, but not IRTalk. Revision C iMac computers do not support infrared communication of any type.
PowerBook G3 Series (Lombard and Wallstreet)
PowerBook G3 Series computers are IrDA compliant.
PowerBook G3(Pismo or Firewire)
The PowerBook (FireWire) supports IrDA.
PowerBook G4 (Titanium) and PowerBook G4 (Gigabit Ethernet)
The PowerBook G4 and PowerBook G4 (Gigabit Ethernet) support IrDA.
BLUETOOTH
Bluetooth is a short range radio link meant to replace the necessity of cables to connect portable and/or fixed electronic devices. The Bluetooth protocol uses a combination of packet and circuit switching to transmit data through variable hop frequency. Connectivity across a network is provided according to time slot division. It provides point-to-point or point-to-multipoint connection, creating links for between 2-8 devices (including the initiating Master/host and its Slave/s) to form a piconet. Multiple piconets that are linked together form a scatternet. A Master in one piconet can be a Slave in another, and vice versa, to form an inter-connected network. Dial-Up Networking, Fax, Headset, LAN Access, and SIM (Subscriber Identity Module) Access functionality all use serial port communication profiles and virtually emulate RS232 (or similar) serial cable port protocols.Ê A Bluetooth management application is necessary in each device to facilitate the serial port emulation. Radio Frequency Communications (RFCOMM) is used to transport user data, modem control signals and configuration commands.
When using a cellular device equipped for Bluetooth communications to transmit data over a cellular network, the Bluetooth link must be established as an initial protocol layer and the cellular network link is negotiated in a second protocol sequence through the cellular device. For example, when attempting to connect a Pocket PC device to the GPRS data network using a cellular phone as a negotiator via a Bluetooth link. The connection is initiated and controlled by the Pocket PC device, but dependent on the SIM functionality available through the cellular phone to negotiate and establish the connection to the cellular network. In this capacity, known as a SIM Access Profile, the cellular phone functions as a Server (or ÒaccepterÓ) while the Pocket PC device acts as a Client (or ÒinitiatorÓ). A Client may have access to only one Server with a SIM at any given time of active connection. Designation of a Client versus Server role is independent of the deviceÕs discover/discoverable status.
To ensure secure communication between the Client and Server devices, several conditions must be met. The Client and Server must be successfully Bonded (otherwise known as Paired) before setting up a SIM Access Profile or configuring the settings of a GPRS/GSM network connection. The SIM bearer (cellular phone) must be properly enabled to initiate authentication. The link between the Client and Server will be encrypted using the Bluetooth baseband and will be at a minimum of 64 bits. Each incident of authentication will be identified with a unique Passkey between the devices that must be in mutual agreement at the time of connection.
Bluetooth transceivers operate in the 2.4 GHz ISM (Industrial Scientific Medical) band. In a majority of the countries in the world this band includes 2.400-2.4835 GHz. Please note that products that implement a reduced frequency band will not work with those that implement the full frequency band. These products that are reduced in frequency (perhaps distributed in different countries), are generally intended for use in a single market. As such, devices developed and/or purchased in Europe and Asia (for example) may not be compatible for use with devices from the United States.
For more general information about Bluetooth development and technology, go to www.bluetooth.com, the official Bluetooth website. Select the link to Bluetooth technology & you to find links to Using Bluetooth technology, Products, and How it works. In the Using Bluetooth technology section, there is a link to view information about connecting a Mobile Phone with a Personal Computer. Here you can view links that include all currently supported and available devices that are applicable to your needs. This will be useful to verify the compatibility of your devices. You can find specific information about the technical details and requirements of modem data transmission using cellular technology with Bluetooth by proceeding to the Developer Information section and viewing the SIM Access Profile and v.1.1 Profiles documentation.
For more info about using Bluetooth technology with Mac OS X and Apple products, go to www.apple.com/bluetooth.
GENERAL DIAGNOSTICS WITH BLUETOOTH
* Make sure that your Bluetooth devices are compatible.
* Your operating system should be current on all applicable software, driver, and firmware updates.
* Verify that the Bluetooth functionality in both devices is turned ÒOnÓ.
* Verify that the devices are currently bonded/ paired. This can often be difficult to assess with the Nokia 6310i. The phone may not show the devices as ÒActiveÓ, but the Bluetooth Manager will display that the devices are paired/bonded. Often the phone will display a Disconnected message. Disregard this message and continue with the instructions in the setup guide.
* Ensure that the Bluetooth Dialup Modem is selected in the Connections (for Pocket PC devices), System Preferences/ Network (in Mac OS X), or Dial-Up Networking properties (in Microsoft Windows OS).
* It may be necessary to attempt to connect multiple times to establish a GSM/GPRS connection. Do not be discouraged if you receive a connection error or receive a Disconnected message on your cellular phone. Due to interference or early product development, it may take several attempts to push the connection through all layers of the Bluetooth service and protocol stack. It is also possible, as is seen with the Nokia 6310i, for a Disconnect message to be given while transfer protocol layers of communication are still recognized and active. In this case, a temporary minor error (Òdata not availableÓ or Òcard not accessibleÓ) is the cause as the Client device attempts to initialize and access the SIM for data packet transfer.
* Verify that you are not in the presence of equipment that may be interfering on the same (or possibly overlapping) radio frequency as your Bluetooth communication. This includes medical equipment, wireless 802.11 connectivity devices, other Bluetooth enabled cellular phones, airport communications, amongst other factors.
* It may be necessary on some devices to alternate in the bonding/pairing process between setting the phone in Discover versus Discoverable mode, as is sometimes the case with the Sony Ericsson T68i.
* Verify that your devices are fully charged.
* Verify that you have GSM/GPRS coverage available at your location and that your wireless account is properly provisioned for data transmission with a modem over the network.
* Check that your connection is using the correct Dialing Location properties and profile. For a GPRS connection, this should follow the instructions to include the letter G in each of the three dialing location fields of the Dialing Patterns specifications as well as verification that the phone number to be dialed is *99# and that the Area Code and Country Code fields are not included in your connection.
Alternative methods of Pairing/Bonding for the Nokia 6310i and iPAQ 3800/3900 series device with Pocket PC 2002 Operating System
If you are experiencing problems due to interference, or if your signal strength is not very strong, modifying the serial port connection may allow you to connect to the GPRS network.
* Open the Bluetooth Manager application on your Pocket PC device.
* Verify that the Bluetooth on your handset is currently On. (You may want to check the power level on your devices.)
* If your Nokia 6310i is not seen as an available device, tap on Search and proceed to locate it and Save it to a group. Otherwise, tap on the Nokia 6310i icon.
* Tap on Actions.
* Select Set as Bluetooth Dialup Modem.
* Tap Actions again.
* Select Connect to COM 1.
* Press Accept on the phone to connect with the Pocket PC device.
* Enter a unique Passcode onto your handset.
* You will have 10 seconds to enter the same Passcode/PIN code onto your Pocket PC device.
* Your phone will notify you that you are connected. You can verify this by scrolling through the Bluetooth menu on your handset and selecting View active device.
* You will have 3 minutes to proceed before your Bluetooth session will time out.
* Proceed to connect using the usual methods outlined in the setup guide.
* You will be notified that the Serial style= style=Port style=connection was terminated . Tap OK and continue anyway. It may take several attempts to get the Bluetooth stack to respond.
* Press Accept to connect to the phone once more.
* The phone will now notify you that a GPRS connection is in progress.
The following method may also be useful if the bonding appears to be unstable and multiple attempts to connect through the Connection Settings fail:
* Open the Bluetooth Manager application on your Pocket PC device.
* On the phone, scroll to select Bluetooth from the main menu, then select Bluetooth and select Off.
* Turn your phone off, then on again to fully reset its Bluetooth protocol stack.
* On the Pocket PC device you should see the Nokia 6310i listed. Tap to select it.
* Tap on Actions.
* Select Remove bond with this device.
* Tap on Actions again.
* Select Remove this device.
* Tap Yes when asked if you want to remove it from all groups.
* Close all open windows on your Pocket PC device and tap on the Bluetooth icon on the lower left corner of your screen.
* Select Turn radio off.
* Soft reset your device according to manufacturerÕs instructions.
* Tap on the Bluetooth icon on the lower right corner of your screen again and select Turn radio on.
* Turn the phone back on, scroll to Bluetooth from the main menu, then select Bluetooth and select On.
* Open the Bluetooth Manager application.
* If you do not see your device listed, tap on Search.
* Tick the box to select your phone, choose a group and select Save.
* Tap OK.
* Tap on the Nokia 6310i icon.
* Tap on Actions.
* Select Create bond with this device.
* Enter a unique PIN code.
* Press Accept on the phone when prompted to Pair with the Pocket PC device.
* Enter the Passcode/PIN code. You will have 10 seconds to complete this task. (If you receive a Disconnected message on the phone, continue anyway.)
* Proceed to set up your connection as usual through your Connection Settings.
* If you are not connected the first time, tap Connect to try again immediately after you receive the Disconnected message on the phone. It may take several attempts to get the Bluetooth stack to respond.
* Press Accept on the phone to accept the connection.
* The phone will indicate that a GPRS connection is in progress.
The processes for troubleshooting Bluetooth in a Windows environment are very similar to those of Pocket PC devices.
* In the Bluetooth Manager application, proceed to click on the Nokia 6310i and select Unpair device, then proceed to turn the Bluetooth radio Off on the computer and on your phone. Reset both devices, then try again. This should clear any temporary problems in the Bluetooth service and protocol stacks.
* It may be necessary to attempt to establish your GSM/GPRRS connection multiple times before you will actually be able to transmit data over the cellular network.
* Verify adequate power level on each device.
* Resolve any issues that may exist with your cellular account or wireless coverage in your location.
* Other wireless electronic devices that operate in (or near) the Industrial, Scientific, and Medical bandwidth may provide significant interference. These include other cellular phones, 802.11 devices, medical equipment, airport communications, amongst other factors.
* You must select secure encryption to be used when creating the bond with your devices in the Bluetooth Manager.
USEFUL AT COMMANDS
When GPRS doesn't appear to be working, or you just want to check that all is well, hopefully the following will prove useful:
Check the phone
Verify that GPRS is currently available in your location and that your cellular account is properly enabled for data transmission over the network using your device as a modem.
If all appears well on the phone, head to HyperTerminal or your equivalent Terminal application and try some of the following style=to further query the status of your ability to communicate with the network:
at+cgatt?
If a value of '1' is returned, then we have GPRS attached. If the value is '0', then GPRS is currently deactivated (i.e. the service is either down or the user is not currently provisioned).
at+cgatt=? will return the supported values for the command
at+cgatt=1 will attempt to attach to the GPRS network
at+cgdcont?
This will allow you to check that the Access Point Name (APN) has been set correctly.
A typical response will look something like this:
+CGDCONT:1,"IP","proxy"
If the APN is set incorrectly for the AT&T Wireless GPRS service, enter the following:
at+cgdcont=1,"IP","proxy"
at+cops?
This will return the identity of the network operator.
at+cgreg?
This will return the network registration status.Ê One of the following values should be returned:
0 - not registered, not searching
1 - registered, home network
2 - not registered, searching
3 - registration denied by network
4 - unknown
Ê
Top
ÊYou welcome
-
Report output to convert to pdf and mail it to recepient
Hi
I'm using the below coding for converting the output of the program to pdf and then mail it to the recepient.The coding works for background processsing only can i do the same for online.In the write statement i'm using the sy-repid my program name and when i get the pdf mail i'm getting the name of the program but instead i need to get the output of my program.Can any one help me in correcting the coding to get the output in pdf format.I know where i'm going wrong but this is the first time i'm working with this so new to this....It would be better if i could run the program and get the convertions into pdf through mail instead of background processing.....Please change the coding below to get the same.....
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE sy-repid.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool'
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Branch Revenue'.
gd_attachment_desc = 'Branch Revenue'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Branch Revenue,Profit and Commissions'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Branch Revenue'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
Thanks in advance.....Hi
Below is the code I was used to convert the sap script( Sales Order) to convert to PDf and send as an attachment.
Dev/UDD Id : EUR-770416 *
Author : M.Sreeram Kumar *
Date : 08-Apr-07 *
Request : DU1K933766
Description: Send an order confirmation to the multiple user in a *
PDF format via Email. *
Change Log *
Author : *
Date : *
Description : *
Request : *
Print of an order confirmation by SAPscript
REPORT zrep_email LINE-COUNT 100 MESSAGE-ID vn.
TABLES: komk, "Communicationarea for conditions
komp, "Communicationarea for conditions
komvd, "Communicationarea for conditions
vbco3, "Communicationarea for view
vbdka, "Headerview
vbdpa, "Itemview
vbdpau, "Subitemnumbers
conf_out, "Configuration data
sadr, "Addresses
tvag, "Reason for rejection
vedka, "Servicecontract head data
vedpa, "Servicecontract position data
vedkn, "Servicecontract head notice data
vedpn, "Servicecontract pos. notice data
vbpa, "Sales Document: Partner
kna1, "General Data in Customer Master
riserls, "Serialnumbers
komser, "Serialnumbers for print
tvbur, "Sales office
tvko, "Sales organisation
adrs, "Communicationarea for Address
fpltdr. "billing schedules
INCLUDE zrep_rvadtabl.
*INCLUDE yzrvadtabl.
*INCLUDE RVADTABL.
INCLUDE zrep_rvdirekt.
*INCLUDE yzrvdirekt.
*INCLUDE RVDIREKT.
INCLUDE zrep_vedadata.
*INCLUDE yzvedadata.
*INCLUDE VEDADATA.
DATA: retcode LIKE sy-subrc. "Returncode
DATA: repeat(1) TYPE c.
DATA: xscreen(1) TYPE c. "Output on printer or screen
DATA: BEGIN OF steu, "Controldata for output
vdkex(1) TYPE c,
vdpex(1) TYPE c,
kbkex(1) TYPE c,
kbpex(1) TYPE c,
END OF steu.
DATA: BEGIN OF tvbdpa OCCURS 0. "Internal table for items
INCLUDE STRUCTURE vbdpa.
DATA: END OF tvbdpa.
DATA: BEGIN OF tkomv OCCURS 50.
INCLUDE STRUCTURE komv.
DATA: END OF tkomv.
DATA: BEGIN OF tkomvd OCCURS 50.
INCLUDE STRUCTURE komvd.
DATA: END OF tkomvd.
DATA: BEGIN OF tvbdpau OCCURS 5.
INCLUDE STRUCTURE vbdpau.
DATA: END OF tvbdpau.
DATA: BEGIN OF tkomcon OCCURS 50.
INCLUDE STRUCTURE conf_out.
DATA: END OF tkomcon.
DATA: BEGIN OF tkomservh OCCURS 1.
INCLUDE STRUCTURE vedka.
DATA: END OF tkomservh.
DATA: BEGIN OF tkomservp OCCURS 5.
INCLUDE STRUCTURE vedpa.
DATA: END OF tkomservp.
DATA: BEGIN OF tkomservhn OCCURS 5.
INCLUDE STRUCTURE vedkn.
DATA: END OF tkomservhn.
DATA: BEGIN OF tkomservpn OCCURS 5.
INCLUDE STRUCTURE vedpn.
DATA: END OF tkomservpn.
DATA: BEGIN OF tkomser OCCURS 5.
INCLUDE STRUCTURE riserls.
DATA: END OF tkomser.
DATA: BEGIN OF tkomser_print OCCURS 5.
INCLUDE STRUCTURE komser.
DATA: END OF tkomser_print.
DATA: BEGIN OF tfpltdr OCCURS 5.
INCLUDE STRUCTURE fpltdr.
DATA: END OF tfpltdr.
DATA: pr_kappl(01) TYPE c VALUE 'V'. "Application for pricing
DATA: BEGIN OF char_val OCCURS 0,
atnam LIKE cabn-atnam,
atwrt LIKE ausp-atwrt,
END OF char_val.
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
PERFORM processing.
IF retcode NE 0.
return_code = 1.
ELSE.
return_code = 0.
ENDIF.
ENDFORM. "ENTRY
FORM PROCESSING *
FORM processing.
PERFORM get_data.
CHECK retcode = 0.
PERFORM form_open USING xscreen vbdka-land1.
CHECK retcode = 0.
PERFORM logo_selection.
PERFORM form_title_print.
CHECK retcode = 0.
PERFORM write_header_info.
PERFORM validity_print.
CHECK retcode = 0.
PERFORM header_data_print.
CHECK retcode = 0.
PERFORM header_serv_print.
CHECK retcode = 0.
PERFORM header_notice_print.
CHECK retcode = 0.
PERFORM header_inter_print.
CHECK retcode = 0.
PERFORM header_text_print.
CHECK retcode = 0.
PERFORM item_print.
CHECK retcode = 0.
PERFORM end_print.
CHECK retcode = 0.
PERFORM form_close.
CHECK retcode = 0.
PERFORM zemail_process.
ENDFORM. "PROCESSING
S U B R O U T I N E S *
FORM ALTERNATIVE_ITEM *
A text is printed, if the item is an alternative item. *
FORM alternative_item.
CHECK vbdpa-grpos CN '0'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ALTERNATIVE_ITEM'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "ALTERNATIVE_ITEM
FORM CHECK_REPEAT *
A text is printed, if it is a repeat print for the document. *
FORM check_repeat.
CLEAR repeat.
SELECT * INTO *nast FROM nast WHERE kappl = nast-kappl
AND objky = nast-objky
AND kschl = nast-kschl
AND spras = nast-spras
AND parnr = nast-parnr
AND parvw = nast-parvw
AND nacha BETWEEN '1' AND '4'.
CHECK *nast-vstat = '1'.
repeat = 'X'.
EXIT.
ENDSELECT.
ENDFORM. "CHECK_REPEAT
FORM DELIVERY_DATE *
If the delivery date in the item is different to the header *
date and there are no scheduled quantities, the delivery date *
is printed in the item block. *
FORM delivery_date.
IF vbdka-lfdat = space AND
vbdpa-lfdat NE space AND
vbdpa-etenr_da = space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_DELIVERY_DATE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "DELIVERY_DATE
FORM DIFFERENT_CONSIGNEE *
If the consignee in the item is different to the header con- *
signee, it is printed by this routine. *
FORM different_consignee.
CHECK vbdka-name1_we NE vbdpa-name1_we
OR vbdka-name2_we NE vbdpa-name2_we
OR vbdka-name3_we NE vbdpa-name3_we
OR vbdka-name4_we NE vbdpa-name4_we.
CHECK vbdpa-name1_we NE space
OR vbdpa-name2_we NE space
OR vbdpa-name3_we NE space
OR vbdpa-name4_we NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_CONSIGNEE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "DIFFERENT_CONSIGNEE
FORM DIFFERENT_REFERENCE_NO *
If the reference number in the item is different to the header*
reference number, it is printed by this routine. *
FORM different_reference_no.
CHECK vbdpa-vbeln_vang NE vbdka-vbeln_vang
OR vbdpa-vbtyp_vang NE vbdka-vbtyp_vang.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_REFERENCE_NO'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "DIFFERENT_REFERENCE_NO
FORM DIFFERENT_TERMS *
If the terms in the item are different to the header terms, *
they are printed by this routine. *
FORM different_terms.
DATA: us_vposn LIKE vedpa-vposn.
DATA: us_text(1) TYPE c. "Flag for Noticetext was printed
IF vbdpa-zterm NE vbdka-zterm AND
vbdpa-zterm NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_PAYMENT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
IF vbdpa-inco1 NE space.
IF vbdpa-inco1 NE vbdka-inco1 OR
vbdpa-inco2 NE vbdka-inco2.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_DELIVERY'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDIF.
Print different validity-data for the position
READ TABLE tkomservp WITH KEY vbdpa-posnr.
IF sy-subrc EQ 0.
vedpa = tkomservp.
IF vedpa-vbegdat NE space AND
vedpa-venddat NE space AND
NOT vedpa-vbegdat IS INITIAL AND
NOT vedpa-venddat IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_SERV1'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSEIF vedpa-vbegdat NE space AND
NOT vedpa-vbegdat IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_SERV2'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_SERV3'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDIF.
Notice-rules for the positions.
MOVE vbdpa-posnr TO us_vposn.
CLEAR us_text.
LOOP AT tkomservpn WHERE vposn = us_vposn.
vedpn = tkomservpn.
IF us_text IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_NOTTXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
us_text = charx.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_NOTICE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDLOOP.
IF NOT us_text IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'EMPTY_LINE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "DIFFERENT_TERMS
FORM END_PRINT *
FORM end_print.
PERFORM get_header_prices.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
PERFORM header_price_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'END_VALUES'.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'SUPPLEMENT_TEXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "END_PRINT
FORM FORM_CLOSE *
End of printing the form *
FORM form_close.
CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
otfdata = t_otfdata
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF sy-subrc NE 0.
PERFORM protocol_update.
retcode = 1.
ENDIF.
SET COUNTRY space.
ENDFORM. "FORM_CLOSE
FORM FORM_OPEN *
Start of printing the form *
--> US_SCREEN Output on screen *
' ' = printer *
'X' = screen *
--> US_COUNTRY County for telecommunication and SET COUNTRY *
FORM form_open USING us_screen us_country.
INCLUDE zrep_rvadopfo.
INCLUDE yzrvadopfo.
INCLUDE RVADOPFO.
ENDFORM. "FORM_OPEN
FORM FORM_TITLE_PRINT *
Printing of the form title depending of the field VBTYP *
FORM form_title_print.
CASE vbdka-vbtyp.
WHEN 'A'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_A'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'B'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_B'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'C'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_C'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'E'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_E'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'F'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_F'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'G'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_F'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'H'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_H'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'K'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_K'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'L'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_L'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN OTHERS.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_OTHERS'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDCASE.
IF repeat NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'REPEAT'
window = 'REPEAT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "FORM_TITLE_PRINT
FORM GET_DATA *
General provision of data for the form *
FORM get_data.
DATA: us_veda_vbeln LIKE veda-vbeln.
DATA: us_veda_posnr_low LIKE veda-vposn.
CALL FUNCTION 'RV_PRICE_PRINT_REFRESH'
TABLES
tkomv = tkomv.
CLEAR komk.
CLEAR komp.
vbco3-mandt = sy-mandt.
vbco3-spras = nast-spras.
vbco3-vbeln = nast-objky.
vbco3-kunde = nast-parnr.
vbco3-parvw = nast-parvw.
CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
EXPORTING
comwa = vbco3
IMPORTING
kopf = vbdka
TABLES
pos = tvbdpa.
Fetch servicecontract-data and notice-data for head and position.
us_veda_vbeln = vbdka-vbeln.
us_veda_posnr_low = posnr_low.
CALL FUNCTION 'SD_VEDA_GET_PRINT_DATA'
EXPORTING
i_document_number = us_veda_vbeln
i_language = sy-langu
i_posnr_low = us_veda_posnr_low
TABLES
print_data_pos = tkomservp
print_data_head = tkomservh
print_notice_pos = tkomservpn
print_notice_head = tkomservhn.
PERFORM get_controll_data.
PERFORM sender.
PERFORM check_repeat.
PERFORM tvbdpau_create.
ENDFORM. "GET_DATA
FORM GET_ITEM_BILLING_SCHEDULES *
In this routine the billing schedules are fetched from the *
database. *
FORM get_item_billing_schedules.
REFRESH tfpltdr.
CHECK NOT vbdpa-fplnr IS INITIAL.
CALL FUNCTION 'BILLING_SCHED_PRINTVIEW_READ'
EXPORTING
i_fplnr = vbdpa-fplnr
i_language = nast-spras
TABLES
zfpltdr = tfpltdr.
ENDFORM. "GET_ITEM_BILLING_SCHEDULES
*& Form ITEM_BILLING_SCHEDULES_PRINT
This routine prints the billing shedules of a salesdocument *
position. *
FORM item_billing_schedules_print.
DATA: first_line(1) TYPE c.
first_line = charx.
LOOP AT tfpltdr.
fpltdr = tfpltdr.
Output of the following printlines
IF NOT fpltdr-perio IS INITIAL.
periodische Fakturen
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_PERIODIC'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
bei periodischen nur eine Zeile
EXIT.
ELSEIF fpltdr-fareg CA '14'.
prozentuale Teilfakturierung
IF NOT first_line IS INITIAL.
CLEAR first_line.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_PERCENT_HEADER'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_PERCENT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ELSEIF fpltdr-fareg CA '235'.
wertmäßige Teilfakturierung
IF NOT first_line IS INITIAL.
CLEAR first_line.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_VALUE_HEADER'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_VALUE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ELSEIF fpltdr-fareg CA '3'.
Schlußrechnung
ENDIF.
ENDLOOP.
ENDFORM. "ITEM_BILLING_SCHEDULES_PRINT
*eject
FORM GET_ITEM_CHARACTERISTICS *
In this routine the configuration data item is fetched from *
the database. *
FORM get_item_characteristics.
REFRESH tkomcon.
CHECK NOT vbdpa-cuobj IS INITIAL.
CALL FUNCTION 'CUD0_GET_CONFIGURATION' "#EC EXISTS
EXPORTING
instance = vbdpa-cuobj
language = nast-spras
TABLES
configuration = tkomcon
EXCEPTIONS
OTHERS = 4.
ENDFORM. "GET_ITEM_CHARACTERISTICS
FORM GET_ITEM_PRICES *
In this routine the price data for the item is fetched from *
the database. *
FORM get_item_prices.
CLEAR: komp,
tkomv.
IF komk-knumv NE vbdka-knumv.
CLEAR komk.
komk-mandt = sy-mandt.
komk-kalsm = vbdka-kalsm.
komk-kappl = pr_kappl.
komk-waerk = vbdka-waerk.
komk-knumv = vbdka-knumv.
komk-vbtyp = vbdka-vbtyp.
ENDIF.
komp-kposn = vbdpa-posnr.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
EXPORTING
comm_head_i = komk
comm_item_i = komp
language = nast-spras
IMPORTING
comm_head_e = komk
comm_item_e = komp
TABLES
tkomv = tkomv
tkomvd = tkomvd.
ENDFORM. "GET_ITEM_PRICES
FORM GET_HEADER_PRICES *
In this routine the price data for the header is fetched from *
the database. *
FORM get_header_prices.
CALL FUNCTION 'RV_PRICE_PRINT_HEAD'
EXPORTING
comm_head_i = komk
language = nast-spras
IMPORTING
comm_head_e = komk
TABLES
tkomv = tkomv
tkomvd = tkomvd.
ENDFORM. "GET_HEADER_PRICES
*& Form HEADER_DATA_PRINT
Printing of header data like terms, weights .... *
FORM header_data_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER_DATA'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. " HEADER_DATA_PRINT
FORM HEADER_PRICE_PRINT *
Printout of the header prices *
FORM header_price_print.
LOOP AT tkomvd.
AT FIRST.
IF komk-supos NE 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_SUM'.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'UNDER_LINE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDAT.
komvd = tkomvd.
IF komvd-koaid = 'D'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TAX_LINE'.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'SUM_LINE'.
ENDIF.
ENDLOOP.
DESCRIBE TABLE tkomvd LINES sy-tfill.
IF sy-tfill = 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'UNDER_LINE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "HEADER_PRICE_PRINT
FORM HEADER_TEXT_PRINT *
Printout of the headertexts *
FORM header_text_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER_TEXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "HEADER_TEXT_PRINT
FORM ITEM_CHARACERISTICS_PRINT *
Printout of the item characteristics -> configuration *
FORM item_characteristics_print.
LOOP AT tkomcon.
conf_out = tkomcon.
IF sy-tabix = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE_CONFIGURATION_HEADER'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE_CONFIGURATION'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "ITEM_CHARACTERISTICS_PRINT
FORM ITEM_DELIVERY_CONFIRMATION *
If the delivery date is not confirmed, a text is printed *
FORM item_delivery_confirmation.
CHECK vbdpa-lfdat = space.
CHECK vbdpa-kwmeng NE 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_DELIVERY_CONFIRMATION'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "ITEM_DELIVERY_CONFIRMATION
FORM ITEM_PRICE_PRINT *
Printout of the item prices *
FORM item_price_print.
LOOP AT tkomvd.
komvd = tkomvd.
IF sy-tabix = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE_PRICE_QUANTITY'.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE_PRICE_TEXT'.
ENDIF.
ENDLOOP.
ENDFORM. "ITEM_PRICE_PRINT
FORM ITEM_PRINT *
Printout of the items *
FORM item_print.
DATA: da_subrc LIKE sy-subrc,
da_dragr LIKE tvag-dragr.
CALL FUNCTION 'WRITE_FORM' "First header
EXPORTING element = 'ITEM_HEADER'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
CALL FUNCTION 'WRITE_FORM' "Activate header
EXPORTING element = 'ITEM_HEADER'
type = 'TOP'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
LOOP AT tvbdpa.
vbdpa = tvbdpa.
TVAG lesen um festzustellen ob abgesagte Positionen gedruckt werden
sollen
PERFORM tvag_select(sapmv45a) USING vbdpa-abgru
da_dragr
space
da_subrc.
IF da_dragr EQ space. "Print rejected item?
IF vbdpa-posnr_neu NE space. "Item
PERFORM get_item_serials.
PERFORM get_item_characteristics.
PERFORM get_item_billing_schedules.
PERFORM get_item_prices.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE'.
PERFORM item_rejected.
PERFORM item_price_print.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
PERFORM item_text_print.
PERFORM item_serials_print.
PERFORM item_characteristics_print.
PERFORM alternative_item.
PERFORM delivery_date.
PERFORM item_delivery_confirmation.
PERFORM item_billing_schedules_print.
PERFORM different_reference_no.
PERFORM different_terms.
PERFORM different_consignee.
PERFORM schedule_header.
PERFORM main_item.
ELSE.
PERFORM schedule_print.
ENDIF.
ENDIF.
ENDLOOP.
CALL FUNCTION 'WRITE_FORM' "Deactivate Header
EXPORTING element = 'ITEM_HEADER'
function = 'DELETE'
type = 'TOP'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "ITEM_PRINT
FORM ITEM_REJECTED *
A text is printed, if the item is rejected *
FORM item_rejected.
CHECK NOT vbdpa-abgru IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_REJECTED'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "ITEM_REJECTED
FORM MAIN_ITEM *
A text is printed, if the item is a main item * -
It's very urgent i need help in smartforms
I need your help for smartforms. I created a smartforms in SD for getting quotations. My problem is that when I run da report it is not executing & if i run smartforms it is giving error in da functional module as - In program "/1BCDWB/SAPLSF00000003 ", the following syntax error occurred:
"The data object "I_HEADER" does not have a component called "BNAME"."
and more over i need a code for my my user tht when i execute this form before displaying print or printpreview i should give a popup window asking da user whether to display item code or not then i should get da print or printpreview. when the user needs item code he can print as well if he don't it should not display. this da code i return in se38 editor. In smartforms i wrote code for getting company address etc. I did not write anything in initialization.
source code
*& Application : Sales & Distribution (SD)
*& Description : This report will Print Sales Order Confirmation Using Smartform
*& Transaction Code :
*& Area Menu Code : ZSD
*& Layout : ZSDORDERCONF
*& Dev.Complited On :
REPORT ZSDR0004.
INCLUDE: ZSDI0003.
S U B R O U T I N E S *
FORM ENTRY USING RETURN_CODE TYPE I
US_SCREEN TYPE C.
CLEAR RETCODE.
XSCREEN = US_SCREEN.
PERFORM PROCESSING.
IF RETCODE NE 0.
RETURN_CODE = 1.
ELSE.
RETURN_CODE = 0.
ENDIF.
ENDFORM. "ENTRY
FORM PROCESSING *
FORM PROCESSING.
PERFORM GET_DATA.
CHECK RETCODE = 0.
PERFORM PRINT_DATA.
CHECK RETCODE = 0.
ENDFORM. "PROCESSING
FORM CHECK_REPEAT *
A text is printed, if it is a repeat print for the document. *
FORM CHECK_REPEAT.
CLEAR REPEAT.
SELECT * INTO *NAST FROM NAST WHERE KAPPL = NAST-KAPPL
AND OBJKY = NAST-OBJKY
AND KSCHL = NAST-KSCHL
AND SPRAS = NAST-SPRAS
AND PARNR = NAST-PARNR
AND PARVW = NAST-PARVW
AND NACHA BETWEEN '1' AND '4'.
CHECK *NAST-VSTAT = '1'.
REPEAT = 'X'.
EXIT.
ENDSELECT.
ENDFORM. "CHECK_REPEAT
FORM GET_DATA *
General provision of data for the form *
FORM GET_DATA.
DATA: US_VEDA_VBELN LIKE VEDA-VBELN.
DATA: US_VEDA_POSNR_LOW LIKE VEDA-VPOSN.
DATA: DA_MESS LIKE VBFS OCCURS 0 WITH HEADER LINE.
DATA: DA_SUBRC LIKE SY-SUBRC,
DA_DRAGR LIKE TVAG-DRAGR.
DATA: DA_GANF(1) TYPE C, "Print flag for billing correction
DA_LANF(1) TYPE C. "Print flag for billing correction
CALL FUNCTION 'RV_PRICE_PRINT_GET_MODE'
IMPORTING
E_PRINT_MODE = PRICE_PRINT_MODE.
IF PRICE_PRINT_MODE EQ CHARA.
CALL FUNCTION 'RV_PRICE_PRINT_REFRESH'
TABLES
TKOMV = TKOMV.
ENDIF.
CLEAR KOMK.
CLEAR KOMP.
VBCO3-MANDT = SY-MANDT.
VBCO3-SPRAS = NAST-SPRAS.
VBCO3-VBELN = NAST-OBJKY.
VBCO3-KUNDE = NAST-PARNR.
VBCO3-PARVW = NAST-PARVW.
CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
EXPORTING
COMWA = VBCO3
IMPORTING
KOPF = VBDKA
TABLES
POS = TVBDPA
MESS = DA_MESS
EXCEPTIONS
FEHLER_BEI_DATENBESCHAFFUNG = 1.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
RETCODE = 1.
EXIT.
ELSE.
LOOP AT DA_MESS.
SY-MSGID = DA_MESS-MSGID.
SY-MSGNO = DA_MESS-MSGNO.
SY-MSGTY = DA_MESS-MSGTY.
SY-MSGV1 = DA_MESS-MSGV1.
SY-MSGV2 = DA_MESS-MSGV2.
SY-MSGV3 = DA_MESS-MSGV3.
SY-MSGV4 = DA_MESS-MSGV4.
PERFORM PROTOCOL_UPDATE.
ENDLOOP.
ENDIF.
*Get Header Data In I_HEADER Table.
SELECT VBAKVBELN VBAKAUDAT VBAKKUNNR VBAKWAERK
VBAKVKORG VBAKANGDT VBAKBNDDT VBAKVBTYP
VBAKKNUMV VBAKKALSM VBAKNETWR VBAKVKBUR
VBAKBNAME VBKDBSTKD VBKDBSTDK VBKDINCO1
VBKDINCO2 VBKDZTERM
INTO CORRESPONDING FIELDS OF TABLE I_HEADER
FROM VBAK
JOIN VBKD ON VBKDVBELN = VBAKVBELN
WHERE VBAK~VBELN = VBCO3-VBELN.
**Get Address Number For Company
IF NOT I_HEADER[] IS INITIAL.
READ TABLE I_HEADER INDEX 1.
SELECT SINGLE BUKRS ADRNR INTO (COMPCD, ADDCOMP)
FROM TVKO
WHERE VKORG = I_HEADER-VKORG.
ENDIF.
fill address key --> necessary for emails
ADDR_KEY-ADDRNUMBER = VBDKA-ADRNR.
ADDR_KEY-PERSNUMBER = VBDKA-ADRNP.
ADDR_KEY-ADDR_TYPE = VBDKA-ADDRESS_TYPE.
Fetch servicecontract-data and notice-data for head and position.
US_VEDA_VBELN = VBDKA-VBELN.
US_VEDA_POSNR_LOW = POSNR_LOW.
CALL FUNCTION 'SD_VEDA_GET_PRINT_DATA'
EXPORTING
I_DOCUMENT_NUMBER = US_VEDA_VBELN
I_LANGUAGE = SY-LANGU
I_POSNR_LOW = US_VEDA_POSNR_LOW
TABLES
PRINT_DATA_POS = TKOMSERVP
PRINT_DATA_HEAD = TKOMSERVH
PRINT_NOTICE_POS = TKOMSERVPN
PRINT_NOTICE_HEAD = TKOMSERVHN.
PERFORM GET_CONTROLL_DATA.
PERFORM SENDER.
PERFORM CHECK_REPEAT.
LOOP AT TVBDPA.
VBDPA = TVBDPA.
IF VBDPA-DRAGR EQ SPACE. "Print rejected item?
IF VBDPA-POSNR_NEU NE SPACE. "Item
PERFORM GET_ITEM_SERIALS.
PERFORM GET_ITEM_CHARACTERISTICS.
PERFORM GET_ITEM_BILLING_SCHEDULES.
PERFORM GET_ITEM_PRICES.
PERFORM GET_ITEM_ADDIS.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "GET_DATA
FORM GET_ITEM_BILLING_SCHEDULES *
In this routine the billing schedules are fetched from the *
database. *
FORM GET_ITEM_BILLING_SCHEDULES.
REFRESH TFPLTDR.
CHECK NOT VBDPA-FPLNR IS INITIAL.
CALL FUNCTION 'BILLING_SCHED_PRINTVIEW_READ'
EXPORTING
I_FPLNR = VBDPA-FPLNR
I_LANGUAGE = NAST-SPRAS
I_VBELN = VBDKA-VBELN
TABLES
ZFPLTDR = TFPLTDR.
ENDFORM. "GET_ITEM_BILLING_SCHEDULES
*& FORM GET_ITEM_ADDIS
Additionals data are fetched from database
FORM GET_ITEM_ADDIS.
CLEAR: TADDI_PRINT.
CALL FUNCTION 'WTAD_ADDIS_IN_SO_PRINT'
EXPORTING
FI_VBELN = VBDKA-VBELN
FI_POSNR = VBDPA-POSNR
FI_LANGUAGE = SY-LANGU
TABLES
FET_ADDIS_IN_SO_PRINT = TADDI_PRINT
EXCEPTIONS
ADDIS_NOT_ACTIVE = 1
NO_ADDIS_FOR_SO_ITEM = 2
OTHERS = 3.
ENDFORM. " GET_ITEM_ADDIS
FORM GET_ITEM_CHARACTERISTICS *
In this routine the configuration data item is fetched from *
the database. *
FORM GET_ITEM_CHARACTERISTICS.
DATA DA_T_CABN LIKE CABN OCCURS 10 WITH HEADER LINE.
DATA: BEGIN OF DA_KEY,
MANDT LIKE CABN-MANDT,
ATINN LIKE CABN-ATINN,
END OF DA_KEY.
REFRESH TKOMCON.
CHECK NOT VBDPA-CUOBJ IS INITIAL AND
VBDPA-ATTYP NE VAR_TYP.
CALL FUNCTION 'VC_I_GET_CONFIGURATION'
EXPORTING
INSTANCE = VBDPA-CUOBJ
LANGUAGE = NAST-SPRAS
PRINT_SALES = CHARX
TABLES
CONFIGURATION = TKOMCON
EXCEPTIONS
OTHERS = 4.
RANGES : DA_IN_CABN FOR DA_T_CABN-ATINN.
Beschreibung der Merkmale wegen Objektmerkmalen auf sdcom-vkond holen
CLEAR DA_IN_CABN. REFRESH DA_IN_CABN.
LOOP AT TKOMCON.
DA_IN_CABN-OPTION = 'EQ'.
DA_IN_CABN-SIGN = 'I'.
DA_IN_CABN-LOW = TKOMCON-ATINN.
APPEND DA_IN_CABN.
ENDLOOP.
CLEAR DA_T_CABN. REFRESH DA_T_CABN.
CALL FUNCTION 'CLSE_SELECT_CABN'
EXPORTING
KEY_DATE = SY-DATUM
BYPASSING_BUFFER = ' '
WITH_PREPARED_PATTERN = ' '
I_AENNR = ' '
IMPORTING
AMBIGUOUS_OBJ_CHARACTERISTIC =
TABLES
IN_CABN = DA_IN_CABN
T_CABN = DA_T_CABN
EXCEPTIONS
NO_ENTRY_FOUND = 1
OTHERS = 2.
Preisfindungsmerkmale / Merkmale auf VCSD_UPDATE herausnehmen
SORT DA_T_CABN.
LOOP AT TKOMCON.
DA_KEY-MANDT = SY-MANDT.
DA_KEY-ATINN = TKOMCON-ATINN.
READ TABLE DA_T_CABN WITH KEY DA_KEY BINARY SEARCH.
IF SY-SUBRC <> 0 OR
( ( DA_T_CABN-ATTAB = 'SDCOM' AND
DA_T_CABN-ATFEL = 'VKOND' ) OR
( DA_T_CABN-ATTAB = 'VCSD_UPDATE' ) ) .
DELETE TKOMCON.
ENDIF.
ENDLOOP.
ENDFORM. "GET_ITEM_CHARACTERISTICS
FORM GET_ITEM_PRICES *
In this routine the price data for the item is fetched from *
the database. *
FORM GET_ITEM_PRICES.
CLEAR: KOMP,
TKOMV.
IF KOMK-KNUMV NE VBDKA-KNUMV OR
KOMK-KNUMV IS INITIAL.
CLEAR KOMK.
KOMK-MANDT = SY-MANDT.
KOMK-KALSM = VBDKA-KALSM.
KOMK-KAPPL = PR_KAPPL.
KOMK-WAERK = VBDKA-WAERK.
KOMK-KNUMV = VBDKA-KNUMV.
KOMK-KNUMA = VBDKA-KNUMA.
KOMK-VBTYP = VBDKA-VBTYP.
KOMK-LAND1 = VBDKA-LAND1.
KOMK-VKORG = VBDKA-VKORG.
KOMK-VTWEG = VBDKA-VTWEG.
KOMK-SPART = VBDKA-SPART.
KOMK-BUKRS = VBDKA-BUKRS_VF.
KOMK-HWAER = VBDKA-WAERS.
KOMK-PRSDT = VBDKA-ERDAT.
KOMK-KURST = VBDKA-KURST.
KOMK-KURRF = VBDKA-KURRF.
KOMK-KURRF_DAT = VBDKA-KURRF_DAT.
ENDIF.
KOMP-KPOSN = VBDPA-POSNR.
KOMP-KURSK = VBDPA-KURSK.
KOMP-KURSK_DAT = VBDPA-KURSK_DAT.
if vbdka-vbtyp ca 'HKNOT6'.
if vbdpa-shkzg ca ' A'.
komp-shkzg = 'X'.
endif.
else.
if vbdpa-shkzg ca 'BX'.
komp-shkzg = 'X'.
endif.
endif.
IF PRICE_PRINT_MODE EQ CHARA.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
EXPORTING
COMM_HEAD_I = KOMK
COMM_ITEM_I = KOMP
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
COMM_ITEM_E = KOMP
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ELSE.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM_BUFFER'
EXPORTING
COMM_HEAD_I = KOMK
COMM_ITEM_I = KOMP
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
COMM_ITEM_E = KOMP
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ENDIF.
ENDFORM. "GET_ITEM_PRICES
FORM GET_HEADER_PRICES *
In this routine the price data for the header is fetched from *
the database. *
FORM GET_HEADER_PRICES.
LOOP AT TVBDPA.
CALL FUNCTION 'SD_TAX_CODE_MAINTAIN'
EXPORTING
KEY_KNUMV = VBDKA-KNUMV
KEY_KPOSN = TVBDPA-POSNR
I_APPLICATION = ' '
I_PRICING_PROCEDURE = VBDKA-KALSM
TABLES
XKOMV = TKOMV.
ENDLOOP.
IF PRICE_PRINT_MODE EQ CHARA.
CALL FUNCTION 'RV_PRICE_PRINT_HEAD'
EXPORTING
COMM_HEAD_I = KOMK
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ELSE.
CALL FUNCTION 'RV_PRICE_PRINT_HEAD_BUFFER'
EXPORTING
COMM_HEAD_I = KOMK
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ENDIF.
ENDFORM. "GET_HEADER_PRICES
FORM PRINT_DATA *
Print Quotation *
FORM PRINT_DATA.
DATA: ls_control TYPE ssfctrlop.
data: OUTPUT_OPTIONS TYPE SSFCOMPOP,cf_retcode type sy-subrc.
DATA: ls_print_data_to_read TYPE lbbil_print_data_to_read.
DATA: ls_addr_key LIKE addr_key.
DATA: ls_dlv-land LIKE vbrk-land1.
DATA: ls_job_info TYPE ssfcrescl.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: NAST_ANZAL LIKE NAST-ANZAL. "Number of outputs (Orig. + Cop.)
DATA: NAST_TDARMOD LIKE NAST-TDARMOD. "Archiving only one time
DATA: ls_bil_invoice TYPE lbbil_invoice.
SELECT SINGLE SFORM INTO LF_FORMNAME
FROM TNAPR
WHERE KSCHL = NAST-KSCHL
AND NACHA = NAST-NACHA.
*IF NAST-KSCHL = 'ZORD'.
lf_formname = 'ZSDORDERCONF'.
*ELSEIF NAST-KSCHL = 'ZOR1'.
lf_formname = 'ZSDORDERCONF'.
*ELSEIF NAST-KSCHL = 'ZOR2'.
lf_formname = 'ZCSORDERCONF'.
ENDIF.
determine smartform function module for invoice
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lf_formname
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
READ TABLE I_HEADER INDEX 1.
ls_controL-no_dialog = 'X'.
if sy-ucomm = 'VIEW'.
LS_CONTROL-PREVIEW = 'X'.
endif.
CALL FUNCTION LF_FM_NAME
EXPORTING
control_parameters = ls_control
OUTPUT_OPTIONS = OUTPUT_OPTIONS
SO_VBELN = I_HEADER-VBELN
SO_AUDAT = I_HEADER-AUDAT
SO_REPEAT = REPEAT
SO_TYPE = I_HEADER-VBTYP
SO_CADD = ADDCOMP
SO_CCODE = COMPCD
TABLES
I_HEADER = I_HEADER
TKOMV = TKOMV
I_ITEM = TVBDPA
I_XDATA = I_XDATA
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
ENDFORM. "PRINT_DATA
FORM PROTOCOL_UPDATE *
The messages are collected for the processing protocol. *
FORM PROTOCOL_UPDATE.
CHECK XSCREEN = SPACE.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = SYST-MSGID
MSG_NR = SYST-MSGNO
MSG_TY = SYST-MSGTY
MSG_V1 = SYST-MSGV1
MSG_V2 = SYST-MSGV2
MSG_V3 = SYST-MSGV3
MSG_V4 = SYST-MSGV4
EXCEPTIONS
OTHERS = 1.
ENDFORM. "PROTOCOL_UPDATE
FORM SENDER *
This routine determines the address of the sender (Table VKO) *
FORM SENDER.
SELECT SINGLE * FROM TVKO WHERE VKORG = VBDKA-VKORG.
IF SY-SUBRC NE 0.
SYST-MSGID = 'VN'.
SYST-MSGNO = '203'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = 'TVKO'.
SYST-MSGV2 = SYST-SUBRC.
PERFORM PROTOCOL_UPDATE.
EXIT.
ENDIF.
CLEAR GV_FB_ADDR_GET_SELECTION.
GV_FB_ADDR_GET_SELECTION-ADDRNUMBER = TVKO-ADRNR. "SADR40A
CALL FUNCTION 'ADDR_GET'
EXPORTING
ADDRESS_SELECTION = GV_FB_ADDR_GET_SELECTION
ADDRESS_GROUP = 'CA01'
IMPORTING
SADR = SADR
EXCEPTIONS
OTHERS = 01.
IF SY-SUBRC NE 0.
CLEAR SADR.
ENDIF. "SADR40A
VBDKA-SLAND = SADR-LAND1.
IF SY-SUBRC NE 0.
SYST-MSGID = 'VN'.
SYST-MSGNO = '203'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = 'SADR'.
SYST-MSGV2 = SYST-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
SELECT SINGLE * FROM TVBUR WHERE VKBUR = VBDKA-VKBUR.
IF SY-SUBRC NE 0.
SYST-MSGID = 'VN'.
SYST-MSGNO = '203'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = 'TVBUR'.
SYST-MSGV2 = SYST-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDFORM. "SENDER
*& Form GET_ITEM_SERIALS
This routine give back the serialnumbers of salesdocument *
position. The numbers are processed as print-lines in the *
table KOMSER_PRINT. *
--> US_VBELN Salesdocument
--> US_POSNR Position of the salesdocument
FORM GET_ITEM_SERIALS.
DATA: KEY_DATA LIKE RSEROB,
SERNOS LIKE RSEROB OCCURS 0 WITH HEADER LINE.
KEY_DATA-TASER = 'SER02'.
KEY_DATA-SDAUFNR = VBDKA-VBELN.
KEY_DATA-POSNR = VBDPA-POSNR.
IF KEY_DATA-SDAUFNR IS INITIAL AND NOT
KEY_DATA-POSNR IS INITIAL.
beim Anlegen ist Belegnummer leer - deshalb Dummy-Belegnummer
KEY_DATA-SDAUFNR = CHAR$.
ENDIF.
Read the Serialnumbers of a Position.
REFRESH: TKOMSER,
TKOMSER_PRINT.
CALL FUNCTION 'GET_SERNOS_OF_DOCUMENT'
EXPORTING
KEY_DATA = KEY_DATA
TABLES
SERNOS = SERNOS
EXCEPTIONS
KEY_PARAMETER_ERROR = 1
NO_SUPPORTED_ACCESS = 2
NO_DATA_FOUND = 3
OTHERS = 4.
IF SY-SUBRC NE 0 AND
SY-SUBRC NE 3.
PERFORM PROTOCOL_UPDATE.
ENDIF.
CHECK SY-SUBRC EQ 0.
Serialnummern übergeben
TKOMSER-VBELN = SERNOS-SDAUFNR.
TKOMSER-POSNR = SERNOS-POSNR.
LOOP AT SERNOS.
TKOMSER-SERNR = SERNOS-SERNR.
APPEND TKOMSER.
ENDLOOP.
Process the stringtable for Printing.
CALL FUNCTION 'PROCESS_SERIALS_FOR_PRINT'
EXPORTING
I_BOUNDARY_LEFT = '(_'
I_BOUNDARY_RIGHT = '_)'
I_SEP_CHAR_STRINGS = ',_'
I_SEP_CHAR_INTERVAL = '_-_'
I_USE_INTERVAL = 'X'
I_BOUNDARY_METHOD = 'C'
I_LINE_LENGTH = 50
I_NO_ZERO = 'X'
I_ALPHABET = SY-ABCDE
I_DIGITS = '0123456789'
I_SPECIAL_CHARS = '-'
I_WITH_SECOND_DIGIT = ' '
TABLES
SERIALS = TKOMSER
SERIALS_PRINT = TKOMSER_PRINT
EXCEPTIONS
BOUNDARY_MISSING = 01
INTERVAL_SEPARATION_MISSING = 02
LENGTH_TO_SMALL = 03
INTERNAL_ERROR = 04
WRONG_METHOD = 05
WRONG_SERIAL = 06
TWO_EQUAL_SERIALS = 07
SERIAL_WITH_WRONG_CHAR = 08
SERIAL_SEPARATION_MISSING = 09.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDFORM. " GET_ITEM_SERIALS
*eject
*& Form GET_CONTROLL_DATA
Checks if servicedata for the header exists. *
Checks if servicedata for the position exists. *
Checks if noticedata for the header exists. *
Checks if noticedata for the position exists. *
FORM GET_CONTROLL_DATA.
DATA: LINES TYPE I.
Exists servicedata for the header?
DESCRIBE TABLE TKOMSERVH LINES LINES.
IF LINES GT 0.
STEU-VDKEX = 'X'.
ENDIF.
Exists servicedata for the position?
DESCRIBE TABLE TKOMSERVP LINES LINES.
IF LINES GT 0.
STEU-VDPEX = 'X'.
ENDIF.
Exists noticedata for the header?
DESCRIBE TABLE TKOMSERVHN LINES LINES.
IF LINES GT 0.
STEU-KBKEX = 'X'.
ENDIF.
Exists noticedata for the position?
DESCRIBE TABLE TKOMSERVPN LINES LINES.
IF LINES GT 0.
STEU-KBPEX = 'X'.
ENDIF.
ENDFORM. " GET_CONTROLL_DATA
*eject
*& Form get_fax_land
text
-->P_NAST_TLAND text
form get_fax_land using p_nast_land like nast-tland.
DATA L_land like nast-tland .
clear L_land.
IF NOT addr_key-addrnumber IS INITIAL.
CALL FUNCTION 'WFMC_FAXNUMBER_FOR_ADDRESS'
EXPORTING
adrnr = addr_key-addrnumber
IMPORTING
tland = L_land
EXCEPTIONS
addr_not_exist = 1
OTHERS = 2.
IF sy-subrc = 0 AND NOT L_land IS INITIAL.
p_nast_land = L_land.
ENDIF.
ENDIF.
endform. " get_fax_land
*& Form get_data1
text
-->P_LS_PRINT_DATA_TO_READ text
<--P_LS_ADDR_KEY text
<--P_LS_DLV_LAND text
<--P_LS_BIL_INVOICE text
<--P_CF_RETCODE text
FORM get_data1
USING IS_PRINT_DATA_TO_READ TYPE LBBIL_PRINT_DATA_TO_READ
CHANGING CS_ADDR_KEY LIKE ADDR_KEY
CS_DLV-LAND LIKE VBRK-LAND1
CS_BIL_INVOICE TYPE LBBIL_INVOICE
CF_RETCODE.
IF NAST-OBJKY+10 NE SPACE.
NAST-OBJKY = NAST-OBJKY+16(10).
ELSE.
NAST-OBJKY = NAST-OBJKY.
ENDIF.
read print data
CALL FUNCTION 'LB_BIL_INV_OUTP_READ_PRTDATA'
EXPORTING
IF_BIL_NUMBER = NAST-OBJKY
IF_PARVW = NAST-PARVW
IF_PARNR = NAST-PARNR
IF_LANGUAGE = NAST-SPRAS
IS_PRINT_DATA_TO_READ = IS_PRINT_DATA_TO_READ
IMPORTING
ES_BIL_INVOICE = CS_BIL_INVOICE
EXCEPTIONS
RECORDS_NOT_FOUND = 1
RECORDS_NOT_REQUESTED = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
error handling
CF_RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
get nast partner adress for communication strategy
PERFORM GET_ADDR_KEY USING CS_BIL_INVOICE-HD_ADR
CHANGING CS_ADDR_KEY.
get delivery land
PERFORM GET_DLV-LAND USING CS_BIL_INVOICE-HD_GEN
CHANGING CS_DLV-LAND.
ENDFORM. " get_data1
*& Form GET_ADDR_KEY
text
-->P_CS_BIL_INVOICE_HD_ADR text
<--P_CS_ADDR_KEY text
FORM GET_ADDR_KEY USING IT_HD_ADR TYPE LBBIL_INVOICE-HD_ADR
CHANGING CS_ADDR_KEY LIKE ADDR_KEY.
FIELD-SYMBOLS -ADDRESS_TYPE.
ENDIF.
ENDFORM. " GET_ADDR_KEY
*& Form GET_DLV-LAND
text
-->P_CS_BIL_INVOICE_HD_GEN text
<--P_CS_DLV_LAND text
FORM GET_DLV-LAND USING IT_HD_GEN TYPE LBBIL_INVOICE-HD_GEN
CHANGING CS_DLV-LAND LIKE VBRK-LAND1.
CS_DLV-LAND = IT_HD_GEN-DLV_LAND.
ENDFORM. " GET_DLV-LAND
*& Form set_print_data_to_read
text
-->P_LF_FORMNAME text
<--P_LS_PRINT_DATA_TO_READ text
<--P_CF_RETCODE text
FORM set_print_data_to_read USING IF_FORMNAME LIKE TNAPR-SFORM
CHANGING CS_PRINT_DATA_TO_READ TYPE LBBIL_PRINT_DATA_TO_READ
CF_RETCODE.
FIELD-SYMBOLS: TYPE XFELD.
DATA: LT_FIELDLIST TYPE TSFFIELDS.
set print data requirements
DO.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE
CS_PRINT_DATA_TO_READ TO = 'X'.
ENDDO.
CALL FUNCTION 'SSF_FIELD_LIST'
EXPORTING
FORMNAME = IF_FORMNAME
VARIANT = ' '
IMPORTING
FIELDLIST = LT_FIELDLIST
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
error handling
CF_RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDFORM. " set_print_data_to_read
*& Form set_print_param
text
-->P_LS_ADDR_KEY text
-->P_LS_DLV_LAND text
<--P_LS_CONTROL_PARAM text
<--P_LS_COMPOSER_PARAM text
<--P_LS_RECIPIENT text
<--P_LS_SENDER text
<--P_CF_RETCODE text
FORM set_print_param using IS_ADDR_KEY LIKE ADDR_KEY
IS_DLV-LAND LIKE VBRK-LAND1
CHANGING CS_CONTROL_PARAM TYPE SSFCTRLOP
CS_COMPOSER_PARAM TYPE SSFCOMPOP
CS_RECIPIENT TYPE SWOTOBJID
CS_SENDER TYPE SWOTOBJID
CF_RETCODE TYPE SY-SUBRC.
DATA: LS_ITCPO TYPE ITCPO.
DATA: LF_REPID TYPE SY-REPID.
DATA: LF_DEVICE TYPE TDDEVICE.
DATA: LS_RECIPIENT TYPE SWOTOBJID.
DATA: LS_SENDER TYPE SWOTOBJID.
LF_REPID = SY-REPID.
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
PI_NAST = NAST
PI_COUNTRY = IS_DLV-LAND
PI_ADDR_KEY = IS_ADDR_KEY
PI_REPID = LF_REPID
PI_SCREEN = XSCREEN
IMPORTING
PE_RETURNCODE = CF_RETCODE
PE_ITCPO = LS_ITCPO
PE_DEVICE = LF_DEVICE
PE_RECIPIENT = CS_RECIPIENT
PE_SENDER = CS_SENDER.
IF CF_RETCODE = 0.
MOVE-CORRESPONDING LS_ITCPO TO CS_COMPOSER_PARAM.
CS_CONTROL_PARAM-NO_OPEN
CS_CONTROL_PARAM-NO_CLOSE
CS_CONTROL_PARAM-DEVICE = LF_DEVICE.
CS_CONTROL_PARAM-NO_DIALOG = 'X'.
CS_CONTROL_PARAM-PREVIEW = XSCREEN.
CS_CONTROL_PARAM-GETOTF = LS_ITCPO-TDGETOTF.
CS_CONTROL_PARAM-LANGU = NAST-SPRAS.
CS_CONTROL_PARAM-REPLANGU1
CS_CONTROL_PARAM-REPLANGU2
CS_CONTROL_PARAM-REPLANGU3
CS_CONTROL_PARAM-STARTPAGE
ENDIF.
ENDFORM. " set_print_param
*& Form add_smfrm_prot
text
--> p1 text
<-- p2 text
FORM add_smfrm_prot .
DATA: LT_ERRORTAB TYPE TSFERROR.
DATA: LF_MSGNR TYPE SY-MSGNO.
FIELD-SYMBOLS: TYPE LINE OF TSFERROR.
get smart form protocoll
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
ERRORTAB = LT_ERRORTAB.
add smartform protocoll to nast protocoll
LOOP AT LT_ERRORTAB ASSIGNING .
CLEAR LF_MSGNR.
LF_MSGNR = <FS_ERRORTAB>-ERRNUMBER.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = -MSGID
MSG_NR = LF_MSGNR
MSG_NR = -MSGV4
EXCEPTIONS
OTHERS = 1.
ENDLOOP.
ENDFORM. " add_smfrm_prot
*& Form protocol_update_spool
text
-->P_1115 text
-->P_LS_SPOOLID text
-->P_SPACE text
-->P_SPACE text
-->P_SPACE text
FORM protocol_update_spool USING SYST_MSGNO
P_LS_SPOOLID
P_SPACE1
P_SPACE2
P_SPACE3.
syst-msgid = 'VN'.
syst-msgno = syst_msgno.
syst-msgv1 = p_ls_spoolid.
CONDENSE syst-msgv1.
CHECK xscreen = space.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = syst-msgid
msg_nr = syst-msgno
msg_ty = syst-msgty
msg_v1 = syst-msgv1
msg_v2 = p_space1
msg_v3 = p_space2
msg_v4 = p_space3
EXCEPTIONS
OTHERS = 1.
ENDFORM. " protocol_update_spool
This is Include ZSDI0003
*& Include ZSDI0003
TABLES: KOMK, "Communicationarea for conditions
KOMP, "Communicationarea for conditions
KOMVD, "Communicationarea for conditions
VBCO3, "Communicationarea for view
VBDKA, "Headerview
VBDPA, "Itemview
VBDPAU, "Subitemnumbers
CONF_OUT, "Configuration data
SADR, "Addresses
TVAG, "Reason for rejection
VEDKA, "Servicecontract head data
VEDPA, "Servicecontract position data
VEDKN, "Servicecontract head notice data
VEDPN, "Servicecontract pos. notice data
RISERLS, "Serialnumbers
KOMSER, "Serialnumbers for print
TVBUR, "Sales office
TVKO, "Sales organisation
ADRS, "Communicationarea for Address
FPLTDR, "billing schedules
WTAD_ADDIS_IN_SO_PRINT, "additional
WTAD_BUYING_PRINT_EXTRA_TEXT, "texts belonging to additional
VBAK, "Sales Document Header
VBAP, "Sales Document Item
VBPA, "Sales Document: Partner
T001, "Company codes
MAST, "Material to BOM Link
STKO. "BOM Header
INCLUDE RVADTABL.
INCLUDE RVDIREKT.
INCLUDE VEDADATA.
data for access to central address maintenance
INCLUDE SDZAVDAT.
TYPE-POOLS: ADDI.
DATA PRICE_PRINT_MODE(1) TYPE C. "Print-mode
DATA: RETCODE LIKE SY-SUBRC. "Returncode
DATA: REPEAT(1) TYPE C.
DATA: XSCREEN(1) TYPE C. "Output on printer or screen
DATA: BEGIN OF STEU, "Controldata for output
VDKEX(1) TYPE C,
VDPEX(1) TYPE C,
KBKEX(1) TYPE C,
KBPEX(1) TYPE C,
1) you shouldn't have to do anything with the properties file written for a specific Locale.
2) check this out: http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html
3) BIG5 is BIG5 everywhere.
4) don't know about this one
5,6,7) If you have Windows 98 Chinese Edition, you can probably switch back and forth between English and Chinese -- just put the Chinese characters in a string much like the normal characters. Otherwise, you'll have to enter the Unicode char.
V.V. -
Hi,
As a part of security setup we have done the following things:
- Users created and assigned as members of groups. One group is created per entity.
- Groups have been provisioned for the application and given security class access
- Security classes have been created and attached to metadata. for e.g, all entities have been attached a Sec class in properties.
- In application settings, Node Security = Entity, Security for Entities is Checked, Enable Metadata Sec Filtering is also checked.
Even after this, the security setup doesnt seem to be working. A user with minimal provision (only Data Form Writeback from Excel) and no security class access is also able to see all the entities, also other forms, grids, etc which have been attached diff security classes. He is able to edit the forms and grids.
Can anyone help out as to what is it that we are missing?What role(s) do the users have? Any user with the Administrator role bypasses class access checking and is assumed to have full access to everything. No other role provides this bypass.
Editing forms and grids has nothing to do with Entity security. If the forms and grids have no class assigned to them, they use the [Default] class which I suggest all users have All rights to anyway. If there are grids/forms you do not want users to change, you should assign a specific class to them, other than [Default].
Enable Metadata security filtering should restrict users from seeing the members for which they have None access to, but as long as they have Read or All access, they will see the members in a pick list.
--Chris -
I'm starting the BPEL process by creating webservice data control in a ADF page. How can i get the instance ID of it?
This xpath function returns current instance id of running process ora:getInstanceId().
But in your case I would do this flow in ESB. Because this kind of "provisioning" of data can be done in ESB. Each execution I would define as async. And when exception occurs it will be logged by ESB and moved to error hospital. Administrator can easily use ESB console to query faulted instances and if neccesary he can resubmit them.
Just an idea how to make it faster, without doing some special development. -
CProjects to DMS connectivity issues
Hi Everyone,
We are currently integrating SAP DMS in cProjects.When we try and open the originals of a DIR, the following error messages are displayed:
Application log contains messages for links to SAP R/3 DMS
Message 1: Create Document Link to a New Folder ( application log - subobject: LNK_2_NEW_FOLD )
Cross checked the RFC connection b/w the systems. Seems fine. Please note that SAP DMS is on ECC5.0 and cProjects4.5 is hosted on CRM 7.0 server on two separate systems. Do let know incase you have resolved issues along similar lines. Thanks.
Regards,
Pradeepkumar HaragoldavarSteve,
I have seen this issue many times before and it always turned out to be an issue on the Telco network. It's quite possible either the line itself or some equipment on the provider network mayn't be provisioned for DATA or faulty equipment on their network.
Let us know how you do with it.
HTH
Sundar -
Hi all,
We have a concern regarding the user source to be selected at UME level.
At CUP level you can also set the user source for user details.
Our questions here:
1) Is there any relationship between such user source configuration?
2) Which is the best practice here?
Many thanks in advance. Best regards,
ImanolImanol,
if you're setting up UME to use ActiveDirectory as a data source you can set the CUP data source to UME and get at the AD users from CUP.
While I would advise linking UME to AD usually (if you do that there's no need to create users and passwords for new approvers), I would still create an LDAP connector for AD directly in CUP.
Only the LDAP connector will alllow you to use ALL ActiveDirectory fields for custom fields and/or provisioning extended data into your ERP systems (location, room, department etc.).
Frank. -
i don't know how to get 3G working on my iphone4 can someone please help?
Is there an active sim in the iPhone? Do you have an account with
a supported wireless provider? Can you make and receive phone calls
outside of your house? Is your account provisioned for data as well
as for phone calls? What did your wireless provider say when you
contacted them?
Maybe you are looking for
-
I have been having several annoying problems with iTunes for the past several months... 1) Library content not showing after folder relocation: First, in order to free up space on my C drive, I wanted to relocate my iTunes folder to a new 1TB hard dr
-
Problem with CD-Rom Mount point ( Oracle 8.1.5 for Linux )
I try to create database using dbassist ( copy from CD method But I receive error message about "Can not detect CD-ROM'. Where should I use as my CD-Rom muont point ? null
-
Limit on items in shopping cart
I am trying to determine if there is a limit on the number of items in the shopping cart coming back from the catalog. We use SciQuest and when a user transfers her items back to SRM, she is getting an 400 Bad HTTP request. There are 60 lines on th
-
IDM CC 6.7 Extension blocked after upgrading to FireFox 3.6.6
Well everything was going fine till i upgraded to ver 3.6.6. After running two-three times,it says Firefox blocked IDM CC for your protection. And i really want that add on enabled as i use IDM as my download manager. Please hel me.
-
Adobe update gave me flash player 10.2 but i need 9.0 to watch my shows
help please!