cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Smartform From External System

madhu_vadlamani
Active Contributor
0 Kudos

Dear All,

Hi all. I have a different issue. Using bapi i am able to create quotation and order . They are generating the no also . I General case if we create quotation or order and given the preview the smart form attached to that tcode will be executed and out put will be generated .

Now my requirement is after creating a quotation or sales order using bapi is it possible to execute the smartform and get the output to the mail that maintained at the time of customer maintain . I tried this but struck here . Please share your ideas with me on this .

Regards,

Madhu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi there,

Why do you need a BAPI for O/p trigger? Define a new O/p type & assign it to the sales order type. Define the required condition records. Select a requirement routine that will trigger the O/p after the order is saved.

In BAPI there is something called Import parameters. Define a new import parameter where the user will enter the e-mail address. Update that e-mail address in your sales order (may be in header text or some field which is not used).

In your O/p control prog, write a code to send the O/p to the mail ID maintained in the field or text ID in the sales order.

Regards,

Sivanand

madhu_vadlamani
Active Contributor
0 Kudos

Dear Siva,

Thanks for your immediate reply . Here i am creating the quotation and order from external system . I want to see these out put also from external system . But i did not get you what you explained . Here in directly sap Gui i created an output type and that is sending successfully quotation or order to mail successfully . Give me some idea on this how to this .

Regards,

Madhu.

Former Member
0 Kudos

Hi there,

What do you mean by see O/p type from external sys? Why do you want to see it from an external sys?

Any external sys will not have visibility to SAP. They can just pass the info to SAP & in a response get the confirmation or failure signal.

You can only communicate to an external system only through a BAPI Response (success or failure) or through an O/p EDI IDOC.

Alternatively you can send the O/p as a mail attachment to an external person.

Regards,

Sivanand

madhu_vadlamani
Active Contributor
0 Kudos

Dear Siva,

Once Again thanks for your reply. Here as i said above i am creating quotation or order from external system . I want to show the created quotation details or order details to customer in external system . Is should be done immediately after creation of it .Give me some idea how do it .

Regards,

Madhu.

Former Member
0 Kudos

Hi there,

What O/p you are trying to the customer in external system? Is it a confirmation message or order confirmation O/p?

If it is an order confirmation BA00 or AN00, then like i have told you, you can trigger an EDI message type & send it to the customer.

Basically understand the concept of BAPI. The customer will just invoke this BAPI remotely through some middleware interface by passing a few input parameters (like sold-to, delivery date, materials etc). When the BAPI is called in SAP, it will call transaction VA01 & post the import parameters into the sales orders. External system will not have any visibility of what happens in SAP. Once a BAPI creates a sales order, it will send a return parameter to the external system giving the success / failure messages & the order num (if success). It will not show him the sales order as how we see in SAP screen.

Similarly, if the external system wants any output or see the order confirmation message, then define a new EDI O/p with a copy from BA00. Order confirmation BA00 will show you the order details like sold-to, material, quantity, delivery date etc. Instead of sending the details like a print out (as in BA00), you will send the same details in EDI format to an external system. In whatever the format you send, the details are the same. So how does that matter to the customer in external system to see how it looks like in SAP?

Regards,

Sivanand

madhu_vadlamani
Active Contributor
0 Kudos

Dear Siva,

Once again thanks for your reply. I have a good idea what a bapi will do and what are the parameters to pass and wht return parameters it will give. By using get details bapi i can fetch sales order and quotation details adn able to display it . My requirement is is it possible to trigger a smart from external system by passing the data , If you get any idea on this just share . I know it is possible what i asked you .

Regards,

Madhu.

Former Member
0 Kudos

What is the O/p type that you want to trigger? & what do you want to show in the O/p?

Do you want to trigger the O/p just like that? If yes, purpose?

Regards,

Sivanand

madhu_vadlamani
Active Contributor
0 Kudos

Dear Siva,

Once again thanks for your reply. Here i want to display the smartforms as it is . In sap if you create a quotation or order and given out put it will give us a print preview. In the same way i need in external system.

It means when customer created a quotation immediately the smartform should trigger and out put send to is mail . I hope i am clear on this.

Regards,

Madhu.

Former Member
0 Kudos

Hi there,

Try this:

As per standard SAP, BA00 or AN00 is issued to the sold-to customer to inform about the confirmation status after an order is successfully created. When the external sys calls the BAPI, along with the sales order details, it should also pass mail-id in the import parameters. Store that import parameter somewhere in the sales order either in text or a vacant field.

1) Define ZBA00 or ZAN00 which will trigger the print O/p to the sold-to. Also in the print control prog, you can write a customized code sothat the system also sends a mail to the mail id maintained in the SO. This is a bit complex method.

2) Define BA00 & ZBA00, BA00 will go to the actual sold-to. ZBA00 will go to external sys. Define the same format for BA00 & ZBA00. Since the external system which calls the BAPI is always the same, assign the printer which is at that location in condition records. So ZBA00 will always go to that printer. External sys will get the format which the sold-to gets. Simple method.

3) Define ZBA00 as an EDI message (xml format). Every EDI message will have an middleware interface (like UNIX). When SAP sends the data, middleware will convert it into whatever format which the external sys requires. Requires a new middleware interface.

In whatever the option you choose, define a new BAPI for eg Z_BAPI_ZBA00. External sys will pass ZBA00 in input parameter. If the external system wishes to retrigger the O/p, then it will call this BAPI. Z_BAPI_ZBA00 will internally call RSNAST00 which will retrigger the O/p for all sales orders.

Hope this helps.

Regards,

Sivanand

madhu_vadlamani
Active Contributor
0 Kudos

Dear Siva,

Thanks for your reply. I did not get you . I think ti is complicated issue .

Regards,

Madhu