2008 Feb 27 9:01 PM
I have an urgent request to build a front-end interface to map the parameters to SAP Standard object RFOAVIS_FPAYM. This is the driver program for Remit (Payment) Advice Notes using SAPScript. I need to create a way to submit RFOAVIS_FPAYM and Return back to the calling program after the Remit Note has been created in the SAP spooler. Then I need to read the spooled file and pass the parameters to the FM CONVERT_OTF_2_PDF to create a PDF version and email the PDF via SAPConnect.
Has anyone done something similar? I am looking for help in capturing the newly created SAPScript form in the spooler and passing the correct parameters to FM CONVERT_OTF_2_PDF so that I will convert the correct output..
2008 Feb 27 9:18 PM
as soon as spool is generated,
write the below code in the program...
select * from tsp01 where rq2name = sy-uname
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
It will give you the latest spool generated by the program and the user.
use that spool number in the function module to convert to PDF..
I hope it is helpful..
I have an urgent request to build a front-end interface to map the parameters to SAP Standard object RFOAVIS_FPAYM. This is the driver program for Remit (Payment) Advice Notes using SAPScript. I need to create a way to submit RFOAVIS_FPAYM and Return back to the calling program after the Remit Note has been created in the SAP spooler. Then I need to read the spooled file and pass the parameters to the FM CONVERT_OTF_2_PDF to create a PDF version and email the PDF via SAPConnect.
Has anyone done something similar? I am looking for help in capturing the newly created SAPScript form in the spooler and passing the correct parameters to FM CONVERT_OTF_2_PDF so that I will convert the correct output..
2008 Feb 27 9:18 PM
as soon as spool is generated,
write the below code in the program...
select * from tsp01 where rq2name = sy-uname
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
It will give you the latest spool generated by the program and the user.
use that spool number in the function module to convert to PDF..
I hope it is helpful..
2008 Feb 28 1:21 AM
Take a look at these two Process BTEs, Business Transaction Events.
00002040 Autom. pmnt transactns: Output of pmnt advice note
00002050 Autom. pmnt transactns: Output of pmnt advice note
Look at them from Tcode BF05 . They can be created from the Customizing Tcode SPRO.
The help document for BTEs in Tcode SPRO is really quite good.
Bruce
The documentation:
Business Transaction Events
This activity describes how you can connect additional components (such as in the form of function modules developed yourself or a product from an external software provider) to the standard R/3 System.
There are two types of interface available in the General Ledger Accounting (FI-GL), Accounts Receivable and Accounts Payable (FI-AR/FI-AP), and Sales and Distribution (SD) components for this:
1. Publish & Subscribe interfaces (also called "informing interfaces" in the following)
These should inform you about particular events (such as a document being entered) in the SAP standard application and make the data generated as a result available to the external software. The external software does not return any data to the standard R/3 System. Examples of such events in the R/3 System are:
Master record was created, changed, or blocked
Document was entered, parked, changed, or reversed
Items were cleared or reset
Additional processing can be caused in the additional component on the basis of these events and data:
Starting a workflow
Generating or changing additional data
Requesting correspondence
2. Process interfaces (also referred to as "process" in the following)
Process interfaces are used to submit business processes to a different control which cannot be realized with the standard system, that is process interfaces replace standard processes.
Here you can structure determination of individual field contents or of specific reactions to process flows individually. It is possible to connect different external developments to the standard R/3 System. The additional developments are generally carried out using the ABAP/4 Development Workbench.
This way you can, for example, influence the control of payment transactions. Selection of payment method, house bank and partner bank can be made using the payment data (currency, amount, and payee) according to a selection logic which you have defined.
Standard settings
Sample modules are delivered in the standard R/3 System which you can copy into your name range and fill them with statements there.
Activities
1. Enter a product using "Settings -> Customer's products". There are generally a large number of function modules belonging to a product which can be called by different program events from within the standard R/3 System. A product can also be an external software component.
If the product is in an external system, enter an RFC destination here. If the product is in the same system, you do not have to enter anything.
Important: Do not forget to activate the product after making the following settings.
2. Establish the interfaces with which the R/3 System provides you.
To do this, choose Environment -> Info system (P/S) or Environment -> Info system (Processes).
Execute the program. You should enter "A" as the attribute type. You see the respective interfaces with which the R/3 System provides you. Note the key of the interface which you require.
You can also select:
By particular SAP application components
By particular events by entering intervals
Which interfaces are used in activated products
Which interfaces are used within a particular country version or within a particular industry
Which interfaces are used within a particular customer product
3. Enter the function module which you have developed yourself. To do this, choose either Goto -> Edit modules within the info system or Settings -> P/S modules or Process modules -> Customer's in the "SAP Business Framework" menu.
Make the following entries:
Key for the interface
The product that you want to use
Function module which belongs to this product.
You can also enter several function modules for a product.
Caution: The function module must be within your name range, that is must begin with the letter Z.
You leave the Ctr and Appl. fields blank unless you want a particular country version or a particular SAP industry-specific component to be enhanced or replaced instead of the standard process flow.
4. Fill the source text of your function module and activate it.
To do this, go again via Environment -> Info system (P/S) or Environment -> Info system (Processes) into the information system and execute the program. Then proceed as follows:
Click twice on the interface you have chosen. If you want, you can look at the interface at this point by choosing Goto -> Interface. Then choose the Back function again afterwards.
Place the cursor on the relevant line and choose Goto -> Function library. You see the sample function module delivered by SAP.
Copy the sample module delivered by SAP and call it the same as the function module entered in step 3.
Fill the source text of the empty function module.
Activate the function module.
Activate the product as described in step 1.
5. Run the R/3 program affected and test whether calling your function module works.
Further notes
The other menu paths are only used for information about additional components delivered by SAP or about software already installed by external software providers.