cancel
Showing results for 
Search instead for 
Did you mean: 

This is a question: Smartforms for RCTI Invoice generation

Former Member
0 Kudos

Hi Guys (and Girls),

I have client who would like to generate an RCTI invoice via smartforms. The system has been configured to immediately print a form once transaction MRRL has been called. However, our attempts to date to get a Smartform to print on creation of the invoice via MRRL has failed miserably.

SAP comes pre-configured to generate RCTI invoices via SAP Script with Form MR_PRINT. This can be changed in config via transaction NACE (Output type MR) to enable a smartform to be selected instead - but the standard program RX08NAST does not appear to be set up to execute smartforms, so all attempts to call the Custom smartform result in SAP Script being called instead. And attempts to change the program from RX08NAST to something like RLB_INVOICE causes the invoice generation program to generate a workflow error and not print anything.

SO, the 8 point question - does anyone know of a program that can be assigned to the RCTI invoice generation output type that will result in a Smartform being called instead if s SAP Script form?

And secondly , the 2 point question, is LB_BIL_INVOICE the best smartform to copy for an RCTI invoice (The RCTI looks the same as a standard Sales Invoice, but I'm concerned because we require vendor data, not customer data, and I don't know if the data structure passed into the LB_BIL_INVOICE form is set up for that)? Can anyone confirm or deny this?

Cheers,

Steve

Message was edited by:

Stephen Keam

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Naresh,

I have tried using a smartform created from scratch - but because I don't know which program to use to call the smartform - I don't know what structure to use to pass the invoice details through.

I've also tried copying LB_BIL_INVOICE, and that is how I determined that it probably won't work - because the IS_* structure was all customer based.

By the way, and RTCI invoice is where we raise an invoice on ourselves on behalf of the vendor. That is why we need vendor and purchase order details rather than customer and sales order details.

Thanks.

Steve

Former Member
0 Kudos

r u printing this invoice from the VF01/02/03

if Yes you can do this as follows.. As i understood.. you are printing a form for Inovice... you need to print invoice details and Venodr and Purchase order Details.

you can achive this as follows..

Note1: in LB_BIL_INVOICE you wont get the vendor details and Purchase Order details... but still you cane achive this bye writing you own select query in Smart form layout - Gobal declaraions>initialization..

<b>Use the RLB_invoice as u r print Program.. Creat your own Layout in SMrtforms ther retrieve the VEnodr and PO Details.. and confiur the output type as Print program is RLB_Invoice and layout is your zLayout.</b>

now you have Invoice details and Vendor and PO details... Prepare a invoice in Smatform asd your Requirement...

In Smartform "Create Form inter face as mentioned in the Print Pogram

<b>JUST this is Exampl only</b>

first call this * Determine smartform function module for invoice

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING FORMNAME = LF_FORMNAME

  • variant = ' '

  • direct_call = ' '

IMPORTING FM_NAME = LF_FM_NAME

EXCEPTIONS NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • Error handling

CF_RETCODE = SY-SUBRC.

PERFORM PROTOCOL_UPDATE.

ENDIF.

then

  • Call smartform invoice

CALL FUNCTION LF_FM_NAME

EXPORTING

ARCHIVE_INDEX = TOA_DARA

ARCHIVE_PARAMETERS = ARC_PARAMS

CONTROL_PARAMETERS = LS_CONTROL_PARAM

MAIL_RECIPIENT = LS_RECIPIENT

MAIL_SENDER = LS_SENDER

OUTPUT_OPTIONS = LS_COMPOSER_PARAM

USER_SETTINGS = SPACE

IS_BIL_INVOICE = LS_BIL_INVOICE

IMPORTING

JOB_OUTPUT_INFO = LS_JOB_INFO

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

  • Error handling

CF_RETCODE = SY-SUBRC.

endif.

<b>Close this thread if when u r problem ise solved

Regards

Naresh Reddy K</b>

Former Member
0 Kudos

hi Stephen

in RLB_INOVICE the standard progam retrive the data ralato the invice though VF02/03.. RLB_INOVICE fill the data into LB_BIL_INVOICE related to that invoice..

But in your scenario you want vendor details instad custome.. idon't think it will work for you..

I don't konow abot the terms RCTI or MRRL... but i hve complete idea about the RLB_invoice..

1. R u created a Smartform layout for this or u r using the existing one.