cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing Title

Former Member
0 Kudos

Hi,

I have a requirement in billing invoice to refer table

VBFA-vbeln = is_bil_invoice-hd_gen-bil_number AND

vbtyp_n = 'M'.

then go VBAK table VBAK vbeln = wa_vbfa-vbelv AND

auart = 'FD'.

if successful then print the Title as Proforma Invoice else just print Invoice .

My query is that while selecting data from VBFA it is taking a lot of time , how to reduce this time and secondly how to show the o/p as "Proforma Invoice" or "Invoice"

Thank You,

SB.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello SB,

Try this logic!!!!

I hope you are displaying "proforma invoice / invoice" in a separate window. Create 2 text elements , 1 for proforma invoice and other for invoice. Now when you are writing your logic for vbak table. If the execution is successful, than assign some variable value say 'x' . Else the variable is blank initially.

Now in your text elements, you can find condition tab, check your variable value accordingly and print proforma invoice or invoice.

Hope this will help you to resolve this issue & close the thread.

Do appreciate if found useful.

BR,

Vinit

Former Member
0 Kudos

Hi Vinit,

Your suggestion did take me a step further, but now in already existing text-element it had

"INvoice"

&GS_HD_GEN-BIL_NUMBER&

my written text-element needs

"Proforma Invoice"

"Free of charge" because of which nothing is getting printed on the form

Thank You,

SB.

Former Member
0 Kudos

Thank You,

issue solved

Answers (2)

Answers (2)

Former Member
0 Kudos

Reading VBFA backward is highly discouraged. Why do you need VBFA? The Sales document is stored in VBRP (at item level since billing document might be for more than one delivery, which might be more than one order). It's also in LIPS at item level.

Edited by: BreakPoint on Mar 16, 2011 2:09 PM correct table name

former_member201227
Active Participant
0 Kudos

HI,

In addition to the document number and document category, you could also pass the document category of the preceding sales document VBTYP_V, while fetching data from VBFA. If there is an entry in VBAK, then you can assign your title to a variable, say "gv_title", based on the condition and pass this to the Import parameters of the Form Interface in Smartforms. If you are coding in the smartforms itself, then declare the variable in the Global data of the Global Definitions node and populate it and call it in the appropriate window.

Best Regards,

Sharmila

Edited by: Sharmila Subramanian on Mar 16, 2011 7:35 AM