â2014 Oct 01 12:56 PM
Hi
I am working on a requirement for Invoice smartform(vf03).
Question :
I have 3 different smartform formats for 3 company codes.
When I hit vf03-> billing doc no - > issue output -> it is picking only one smartform linked to that output type(RD00)
I want to use same output type but with 3 different smartforms , how to assign 3 different samrtforms in NACE transaction or I should go for some Zreport (driver report) ???
Below is the screen shot , please explain me in brief how the-----> Program, FORM Routine & Forms
Please advice
â2014 Oct 01 1:25 PM
Hello,
If the three formats are quite different, you should use three output types.
However, if they are similiar (for example, only the logo changes), you could give that logic to the smartform with abap code.
â2014 Oct 01 1:25 PM
Hello,
If the three formats are quite different, you should use three output types.
However, if they are similiar (for example, only the logo changes), you could give that logic to the smartform with abap code.
â2014 Oct 01 2:02 PM
Hi Pablo,
Thanks for your reply.
Yeah the difference among 3 smartforms is the logo & company address, Header details & footer details. Can I use any ABAP logic to control this things in Single smartform ?? if yes please can you elaborate it . Or Creating different output types could be better solution ?
â2014 Oct 01 2:33 PM
Hi,
There is a standard "Address" objetct that you can insert into your smartform. You only need to specify the address number:
Regarding the logo, there are many ways to get that. For example, you can create a "Alternative logic flow", implement conditions (condition tab) on the graphic object, ABAP code,...
â2014 Oct 02 10:31 AM
Hi,
when you can control 3 different Smartformformats in 3 different Formulars ZVINVOICE01-03 without changing the programm, I guess you can also do this in a single formular and keep ZVINVOICE01
i would not use 3 different output types for the same business case. because you would have 90% same logic but 3 times maintain-costs
regards
Stefan Seeburger
â2014 Oct 02 10:52 AM
Hi Stefan,
You are pretty much rite. As in the current system We have already 3 company codes working with 3 different samrtforms with below settings in the NACE.
I put Break-point to RLB_INVOICE -> vf03-> 901125478(bill doc) -> issue to output-> debugger .
I checked the smartform changes based on billing documents automatically... I mean it is picking up correct one as per company code.
Eg: But again if I select different document no (company code -0002) , the driver program function module automatically picks smartform designed for company code-0002
But RD00 smartform passed is for Company code -0001 (screen shot attached), how come the driver program knows which smartform is to be picked ???
As i have not set up this functionality in the system & person who did this in past have not maintained any documentation , I can't figure out what is going on behind this.
so I have to do company code -0004 but with same output type-- RD00.
Also let me know what is functionality of ZVINVOICE01 ????-->> I didnt see that in RLB_INVOICE
â2014 Oct 02 11:39 AM
Hi,
as you can see in your screenshot above - application and output-type is key for the maintenance of programm and formular in nace. this values are found by the invoice transaction - based on the CU. once your driver programm is called you enter the "entry-routine".
the driverprogramm picks the formular based on the CU-settings in nace (see your screenshot)
if you want another output-type for another company-code just change the conditions in nace (V3->conditions)
thogh i think it doesnt matter if you check output type in your ZVINVOICE01 or if you check VKORG.
i did always do dynamic SO10-Texts in Formular (Sapscript) such as 'Logo'&VKORG01& so each VKORG get its own logo printed. think it works the same for smartforms.
if the formulars look totaly different 1 output type for 1 formular is ok.
regards
Stefan Seeburger
â2014 Oct 02 12:05 PM
Hi Stefan,
Present system is already picking correct smartform based on companycode without any errors.
Now the new company code is added with new sales organization (Z014).
My question is how that driver program knows when to pick which smartform ? As I can see in output type the smartform1 name which is passed is for company code 001.
But when I give billing doc for company code 002 sales org (z012), same driver program pick smartform2 created for company code 002.
When I give billing doc for newly created company code 004 & Sales Org- Z014, debugger picks smartform1 for company code 001, which is passed in NACE --> output types.
Instead it should pick for Smartform 4 for Company code 004.& sales org (Z014).
Is there any customs settings which is done previously I need to extend it for 4th smartform ?
Where can I see the CU settings ??
Below is screen shot of issue output type.. but the process status is 2, because it is picking the
smarform 1 instead it should pick smartform 4.
â2014 Oct 02 2:12 PM
hi Drashti,
i dont know exaclty what you mean. Can you support screenshots for following of your comments:
"But when I give billing doc for company code 002 sales org (z012), same driver program pick smartform2 created for company code 002."
what do you mean by smartform 1 and 2. where do you look it up to veryfy if its wrong?
your very first screenshot shows outputtype RD00. i can see that you have different driver prgoramms for each communication but all use the same formular ZVINCOICE1. where is your smartform2?
regards
Stefan Seeburger
â2014 Oct 02 3:11 PM
Hi Stefan,
Present the scenario
RD00 & V3 setting are below shown & smartform -> Z_SDINV_UK_NEW (this smartform is for comcode-001) .
CASE 1:
I tried to debug the RLB_INVOICE report through VF03 tcode by giving billing document no. (which was for comcode 001 sales org- z001) So the driver program RLB_INVOICE calls smartforms Z_SDINV_UK_NEW with output type RD00 below screen shot & after then in debugger screen for the same is attached.
After then it prints required ouput.
Case 2 : Again with different billing document I debugged in vf03 . This billing doc is for comcode-002 sales org -z002) Below screen & debugger it picked different smartform which is not being passed in NACE output type RD00 ,then also from where it is picking the desired one i.e. comcode 002) But I don't understand how this is working ??
After then it prints proper desired data.
CASE 3: Again with different billing document I executed with same output type in vf03. This billing doc is for comcode-004 sales org -Z004) Below screen & debugger it picked default smartform z_sdinv_uk_new which is passed in NACE output type RD00 ,but this time I want the smartform (z_sdinv_uk_adam) which I created for comcode-004 to be picked by the driver report.
Also I noticed in below screen process status is 2 --that means in vf02 under header data I checked for processing logs there is error in processing that form which says : "Table incoterms in smartform doesn't fits into window".
â2014 Oct 02 3:34 PM
Hi,
i dont got much time so i keep it short
you can check the CU for V3 SD invoice in TCode Spro (see screenshot below). as far as i know there is no more CU regarding this point.
if output-type is always RD00 as far as i know there cant be different formulars - only if the communication-type (email/fax ) is different you can maintain different formulars for different types (under the same output type)
what maybe can happen is if you test old formulars, they can be triggered with an old condition-schemata. but testing with new billings should be shown with 1 and the same formular. defined in Nace / spro (its the same CU)
regards
â2014 Oct 02 10:36 AM
â2014 Oct 02 12:18 PM
Hi Raymond,
Yeah its not only logo, but header footer & some bank details also varies based on company, thats why current system has 3 different smartform but same driver program & output RD00 is used for
printing Invoice for all company.
Now one more company is their with bit different smartform format which I already created but
when I debug RLB_INVOICE , based on billing doc (new company) it picks the smartform created for company 001 which is passed in output type z_sdinv_uk_new, instead it should pick new smartform,
Please guide if i need to extend any existing settings as I have little idea how it is working fine for all 3 company correctly and not for the 4th one (newly created) ???
â2014 Oct 02 2:46 PM
Hi
If the layout is not the same for every company code, and there are many differences it's better to create as many message type as many compnay codes.
Max
â2014 Oct 02 8:41 PM
try to check for an enhancement point in driver program and substitute smartform name based on your conditions, make sure to have proper restrictiions so as to not break standard nast functionality