‎2008 Jul 14 10:26 PM
Hi !
I haave a smartform for invoice. I made some changes to the smartform and saved and activated and all was fine , now when I try running the transaction VF03 and try getting the print preview or print the smartform , somehow I am not getting it in the output. It just wont give me the output. I looked into my smartform from top to bottom but couldnt loacte why the output is not coming . could ahnyone please hint a sto what can be the fproble or where the problem could be or how do I find out what the problem could be please.
Thanks
‎2008 Jul 14 10:34 PM
Hi,
Did you try placing a break-point in the smartforms? Check the parameter values that are getting passed to the smartforms.
Regards,
Subramanian
‎2008 Jul 14 10:34 PM
Hi Aarav,
Assuming that you have copied the standard Smart form and made the changes: Check that your custom smart form name is configured correctly in NACE Transaction, for application V3.
Regards,
Akash Modi
‎2008 Jul 14 10:35 PM
Hi,
There could be several reason on not to get the output for Smartform.
If u r using sme templates in windows then the size of template should not be exactly equal to the window size.
if tht is not the reason then debug the smartform and check sy-subrc after every call FM .
Thanks,
Kinjal
‎2008 Jul 14 10:40 PM
This smartform was alreday in use and everything was ok , just that there were few other changes that was required to it and I made those shanges and saved activated and then tried the output through vf03 transaction , but unfortunately i did not get the print preview. I did place braek points and everything in the rform looks ok . I see a formatting errror in it but where I cannot locate it .
‎2008 Jul 14 10:43 PM
revert back the chages u did and try to get print preview.
If you are getting it then it must be u need to take care while u r doing changes.
‎2008 Jul 14 11:07 PM
Hi,
Could be like some new field is overlapping the other.
Check the width of the page and the new ly placed fields.
In the smartforms menu, you will find GENERATE option. Try generating the smartform again.
Regards,
Subramanian
‎2008 Jul 14 11:17 PM
No Luch I removed my changes but still the output is not comming, cant locate the formating error
‎2008 Jul 14 11:20 PM
‎2008 Jul 15 4:43 PM
Thanks I was able to get back the invoice seetings and its showing . I have a small question with the same smartform if soemone can help me pls as its on high priority. In my smartform I have to set up a material group '1000' in such a way that it dosent show the QTY and the Unit price column whenever we have that material group , only the total will show . I mean whenever we have a material with material group 1000 the qty and the Unit price column should be blank and not show any thisng. I have set up the condition in each of them when matkl <> 1000 in validation but yet its hows up . I see a code part in it which maybe teh place I shld be adding someting too but not sure as to how to go about. Kindly help .
DATA: LWA_IT_GEN TYPE LBBIL_IT_GEN.
data: l_kunnr like vbpa-kunnr,
l_adrnr like vbpa-adrnr,
l_kdmat like vbap-kdmat.
data: lt_3rd_party type T_3RD_PARTY.
LOOP AT IS_BIL_INVOICE-IT_GEN INTO WA_IT_GEN.
IF WA_IT_GEN-UEPOS = '000000' OR WA_IT_GEN-ZZMATKL = '1022' .
GS_IT_CONT-FKIMG = WA_IT_GEN-FKIMG.
GS_IT_CONT-MATERIAL = WA_IT_GEN-MATERIAL.
endif.
GS_IT_CONT-VBELN = WA_IT_GEN-ZZVBELN.
GS_IT_CONT-SALES_UNIT = WA_IT_GEN-SALES_UNIT.
READ TABLE IS_BIL_INVOICE-IT_PRICE INTO GS_IT_PRICE1 WITH KEY
BIL_NUMBER = WA_IT_GEN-BIL_NUMBER
ITM_NUMBER = WA_IT_GEN-ITM_NUMBER.
GS_IT_CONT-zbill_number = WA_IT_GEN-BIL_NUMBER.
GS_IT_CONT-zitem_number = WA_IT_GEN-ITM_NUMBER.
GS_IT_CONT-NETPR = GS_IT_PRICE1-NETPR.
GS_IT_CONT-NETWR = GS_IT_PRICE1-NETWR.
GS_IT_CONT-WAERK = GS_IT_PRICE1-WAERK.
gs_it_cont-uepos = wa_it_gen-uepos.
clear: gs_3rd_party.
* get vendor with invoice
select single kunnr adrnr into
(l_kunnr, l_adrnr)
from vbpa where vbeln = gs_it_cont-zbill_number and
posnr = gs_it_cont-zitem_number and
parvw = 'ZV'.
* Not found get vendor from sales order
if sy-subrc <> 0.
READ TABLE IS_BIL_INVOICE-IT_reford INTO GS_IT_reford WITH KEY
BIL_NUMBER = WA_IT_GEN-BIL_NUMBER
ITM_NUMBER = WA_IT_GEN-ITM_NUMBER.
select single kunnr adrnr into
(l_kunnr, l_adrnr)
from vbpa where vbeln = gs_it_reford-ORDER_NUMB and
posnr = gs_it_reford-ITM_NUMBER_ORD and
parvw = 'ZV'.
endif.
*
if sy-subrc = 0.
G_3RD_PARTY_IND = 'X'.
select single name1 into gs_3rd_party-name1
from adrc
where
addrnumber = l_adrnr.
gs_3rd_party-kunnr = l_kunnr.
gs_3rd_party-short_text = gs_it_cont-short_text.
gs_3rd_party-netwr = gs_it_cont-netwr.
gs_3rd_party-bil_number = gs_it_cont-zbill_number.
gs_3rd_party-itm_number = gs_it_cont-zitem_number.
gs_3rd_party-uepos = wa_it_gen-uepos.
.
* get ref
read table is_bil_invoice-it_reford into GS_REFORD_SH
with key
bil_number = gs_it_cont-zbill_number
itm_number = gs_it_cont-zitem_number.
select single bstkd into gs_3rd_party-ref_number
from vbkd
where
vbeln = GS_REFORD_SH-ORDER_NUMB and
posnr = GS_REFORD_SH-ITM_NUMBER_ORD.
* no ref found with item, then go to basic
if sy-subrc <> 0.
select single bstkd into gs_3rd_party-ref_number
from vbkd
where
vbeln = GS_REFORD_SH-ORDER_NUMB and
posnr = '000000'.
endif.
append gs_3rd_party to gt_3rd_party.
else.
* create
append GS_IT_CONT TO IT_CONT_3.
endif.
ENDLOOP.
.
Thanks
‎2008 Jul 15 5:49 PM
Actually I am getting 0.00 in place of qty and unit price , and I want to remove it into and replace by space. I have put the clear statement but its still bot removing the zeros. can anyone tell m em where to put the clear statement exactly so that the zeros are removed altogeter
‎2008 Jul 15 5:55 PM
Hi,
In smartforms, Put condition that if not QTY is initial then print into the output.
otherwise not to print.
That will work for you.
You do not need to clear b'coz if u clear qtu field then also by default it will show '0.000' into Smartforms.
Thanks,
Kinjal
‎2008 Jul 15 6:15 PM
Yes I have put that condition already but the 0.00 is coming and I want to remove that . when the material group MATKL is '1000' it should give me a blank instead of 0.00 and that is what i want. In the code above we have to put a small line just to clear that 0.00 for which I need to put the clear statemnt , but unfortunately I am unable to place it at the right spot. Its like when the MATKL is 1027 we have to clear the work area. Could you please help me out looking at the code above please.
Thanks
‎2008 Jul 15 7:15 PM
If you put condition in smartforms that if not qty is initial then it should work otherwise in program pass qty field to char. field and then use clear statement.
‎2008 Jul 15 9:17 PM
In the alternative condition filed I want to change the character format form number to character so that teh zeros dont appear when condtio dont satisfy , how do I cange the charcetre format of teh field for eg: &gs_cont_qty(c)& to $gs_cont_qty(ci)& I think this will help me but I dont know how to change the character formt of the filed. from numeric to chartacter .
Can you help please.
Thanks
‎2008 Jul 15 9:34 PM
Hi,
Define variable in the program like
Data: v_var(10) type c.
Then pass value from qty to charac. :
v_var = gs_cont_qty.
then pass v_var to ur smartform or sap-script.
if not v__var is initial.
&v_var&
endif.
‎2008 Jul 15 9:51 PM
Is it not possible to just change the number format to character format and supress the result with &gs_qty(<ci)& instead of declaring the varaible. I tink this can be done this way but I am not sure how to change from &gs_qty(<c)& to &gs_qty(<ci)& .
and where to change it .
Thanks
‎2008 Jul 16 11:20 PM