cancel
Showing results for 
Search instead for 
Did you mean: 

How to get values in print program from vf22 tocde..

Former Member
0 Kudos

Hi..

Ive created a outputtype for vf22 tcode. but how to get the value entered in tcode to print program.. i'm new to forms..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try like this.

REPORT z_sd_rep_delivery.

TABLES:nast.

DATA: wa_fm_name TYPE rs38l_fnam,

wa_formname TYPE tdsfname.

DATA : v_vbeln TYPE lips-vbeln.

START-OF-SELECTION.

FORM entry USING return_code us_screen.

PERFORM get_data.

PERFORM processing.

ENDFORM. "ENTRY

&----


*& Form PROCESSING

&----


  • text

----


FORM processing .

wa_formname = 'ZSD_SSF_DELIVERY_CHALLAN'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = wa_formname

IMPORTING

fm_name = wa_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CALL FUNCTION wa_fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

v_vbeln = v_vbeln

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. "PROCESSING

&----


*& Form GET_DATA

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM get_data .

v_vbeln = nast-objky.

ENDFORM. " GET_DATA

In V_vbeln u can get the 'Quotation Number'.

Based on this number u can fetch the data in Smart form.

Answers (3)

Answers (3)

Former Member
0 Kudos

is there any smartform for vf22/..

Former Member
0 Kudos

Hi,

The standard output type is RD00 and there are only PDF Forms available in standard no smartforms :(.

Tnx,

Joe

Edited by: meetjoe on Jul 29, 2009 1:12 PM

Former Member
0 Kudos

Hi,

I believe u shld have copied the SAP std Output type....

Output Type ==> LR00 Invoice list

Print Program ===> RVADIL01

Form ===> SD_INVOICE_LIST

To get data. Trigger the output from VF22,,, Place a break point in the Driver program - '_RVADIL01_'.

U can get the data

----


  • FORM PROCESSING *

----


  • ........ *

----


  • --> PROC_SCREEN *

----


FORM PROCESSING USING PROC_SCREEN.

PERFORM GET_DATA.

Regards,

Bhargava

Former Member
0 Kudos

Thanx for the input..

But do we have any Smartform ..?

Former Member
0 Kudos

each form has a print program that has data processing logic in it and fetches data.. u may use them...check the sdn wiki for the same....U may have to assign the Output Type the driver program(print program), routine and the form name...

-Karthik B.

Former Member
0 Kudos

i wil be entering invoice number in vf22..there in print program i have to get that invoice number i have entered in the screen..how to get that..how can i get it?

Former Member
0 Kudos

use nast table....objky should have the invoice number