Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FORM ROUTINE in Output Types

Former Member
0 Likes
14,882

Hi group,

there is a requirement in which after the generation of accounting document(after saving VF01), we need to immediately reverse some of the lines in the accounting document by using F-02. We have thought of using the Output Type Program to write our code as that was the only genuine place we could find to write our enhancement ( searched for user-exits after accounting doc is generated but cudn't find any). In the program , we shall write the BDC for aor reversal process. Now, when we SAVE VF01, this program(RLB_INVOICE, output type RD00) gets triggered. I thought instead of writing something in the standard program( or even a Z version of it ), we wud write our code in a new program & then assign this program in NACE. I tried with some dummy program(zxxxxx), but there is an error log which says 'Processing Routine Entry does not exist for program zxxxxx).

what is the significance of this FORM Routine 'ENTRY' in the output type??? wat is the solution for my problem??

hope i am clear enough

ur valuable inputs awaited...

--

Thanks & Regards,

Bikash Agarwal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
7,306

Hi ,

this Form Routine is the subroutine defined in the driver program/Print program . When you trigger this print program the form routine in the print program will betriggered. One print program may have more form routines for different O/P or O/P medium. Hence it is mandatory to define form routine.

Regards,

Lanka

I just want to add some more information:

When you have assigned the print program and you are not sure of the form routine. Just Press F4 this will show all the routines avialable in that print program.

For mail : routine is SAPOFFICE_AUFRUF_VX and so on...

Message was edited by: Lanka Murthy

Hi group,

there is a requirement in which after the generation of accounting document(after saving VF01), we need to immediately reverse some of the lines in the accounting document by using F-02. We have thought of using the Output Type Program to write our code as that was the only genuine place we could find to write our enhancement ( searched for user-exits after accounting doc is generated but cudn't find any). In the program , we shall write the BDC for aor reversal process. Now, when we SAVE VF01, this program(RLB_INVOICE, output type RD00) gets triggered. I thought instead of writing something in the standard program( or even a Z version of it ), we wud write our code in a new program & then assign this program in NACE. I tried with some dummy program(zxxxxx), but there is an error log which says 'Processing Routine Entry does not exist for program zxxxxx).

what is the significance of this FORM Routine 'ENTRY' in the output type??? wat is the solution for my problem??

hope i am clear enough

ur valuable inputs awaited...

--

Thanks & Regards,

Bikash Agarwal

7 REPLIES 7
Read only

Former Member
0 Likes
7,307

Hi ,

this Form Routine is the subroutine defined in the driver program/Print program . When you trigger this print program the form routine in the print program will betriggered. One print program may have more form routines for different O/P or O/P medium. Hence it is mandatory to define form routine.

Regards,

Lanka

I just want to add some more information:

When you have assigned the print program and you are not sure of the form routine. Just Press F4 this will show all the routines avialable in that print program.

For mail : routine is SAPOFFICE_AUFRUF_VX and so on...

Message was edited by: Lanka Murthy

Read only

Former Member
0 Likes
7,306

It is not the name that is important, but the interface that is important. You always need to give a program name and subroutine name when you are configuring the output type. The parameters of this subroutine should always be as follows

form myroutine using rc us_screen.

A rc value of 1 indicates that the output is ok.

Also use the medium '8'(Special Function) instead of any other medium.

Srinivas

Read only

Former Member
0 Likes
7,306

Hi

The routine ENTRY is the start form called by the progam runs the print (RSNAST00 for example), that routine has to be defined in the program is assigned to output type.

See the program RLB_INVOICE, here you can find the form ENTRY.

So the program manages the print for the output type RD00 run a comand like this:

PERFORM ENTRY IN PROGRAM RLB_INVOICE USING .......

I don't think there's an exit after accounting document is created, there are some BTE (trx FIBF) are triggered just before it is generated, for example in BTE 1030: here you can know all accounting number and data (but the document isn't stored in database yet).

I don't know if it's a good idea to insert the code in the routine of the print: remember all the process of saving of account document are running in update tusk, so while the output is been printing you can't be sure the accounting document is really stored in database.

Max

Read only

Former Member
0 Likes
7,306

Hi ,

You can add your own user exit at the procedure level. Try that may be help ful.

T/code NACE> Select Billing V3> Procedure--> select V10000 for Billing > Control> Select your O/P and define a new requirement riutine and add your custom control.

May be you can try this.

Regards,

Lanka

Read only

0 Likes
7,306

Thanks a lot guys for ur replies...

Max, as u said, that its doubtful that the tables i ll be looking for reversal will be populated, what do u suggest for my requirement??

Let me explain again, for one particular Billing type, we need to reverse some of the accounting entries in the table after the accounting number is generated( while saving VF01).

We need to do this by writing a code(BDC for F-02) & this code needs to execute automatically after the transaction VF01 is saved. Do u have any other ideas???

Lanka, can u please explain a little more about defining the requirement routine for my functionality. Also, does it take care of the issue that MAX was talking abt?

Srinivas, can i put my custom program in the medium 8 and use that for my purpose?? I tried inserting a subroutine 'ENTRY' in the program that i am using but my program is not getting executed during the course of the transaction after i did that..

All inputs wiil be appreciated....

Thanks & Regards,

Bikash

Read only

0 Likes
7,306

Hi,

The best way would be create a output type with the transmission medium 'T' i.e link a task which gets executed in the background.Implement the logic in a business object's method and use that method to create this task.

Hope this helps you in some extend.

Thank you.

Regards,

Karun.M

Read only

0 Likes
7,306

Another way could be to raise an event in that print routine and schedule your BDC program as a job to be triggered when this event is raised.

You mentioned that your program routine is not getting triggered. Please remember that depending on your output type configuration, it may or may not be output immediately. So make sure that the output type is configured to be triggered immediately. If not, use RSNAST00 to process the output.

Regards,

Srinivas