cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT: One Question, One Issue

Former Member
0 Kudos

Question: Are the Form and Program that run together always listed in table TNAPR? After putiing breakpoints in the Form and Program I can confirm the two are matched. However, I do not see the listed in table TNAPR? Is this correct that they can run together and not be in TNAPR? Where else are they married/configured then?

Issue: One system (test)Form prints fine.. Other system (PROD) Form prining extra data (15 pages worth) so far both layout and prof look identical.

Thank-you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

there are few tables to find out form and print programs :

FI Module - T001F,TTXFP

SD and MM Module - TNAPR Table and NACE Transaction

PM Module - OID1 Transaction

I found one program from Blag ..

You can use this simple program -;)

&----


*& Report Z_DUMMY_ATG

*&

&----


REPORT Z_DUMMY_ATG NO STANDARD PAGE HEADING.

*===============================================================

  • Tablas

*===============================================================

TABLES: TTXFP.

*===============================================================

  • Tablas Internas

*===============================================================

DATA: T_TTXFP TYPE STANDARD TABLE OF TTXFP WITH HEADER LINE.

*===============================================================

  • Selection-Screen

*===============================================================

SELECTION-SCREEN BEGIN OF BLOCK SCRIPT WITH FRAME.

SELECT-OPTIONS:

PRINTNAM FOR TTXFP-PRINT_NAME,

TDFORM FOR TTXFP-TDFORM.

SELECTION-SCREEN END OF BLOCK SCRIPT.

*================================================================

  • Start-of-selection

*================================================================

START-OF-SELECTION.

PERFORM SELECT_DATA.

PERFORM PRINT_DATA.

&----


*& Form SELECT_DATA

&----


FORM SELECT_DATA.

SELECT TDFORM PRINT_NAME LAST_PROG

INTO TABLE T_TTXFP

FROM TTXFP

WHERE PRINT_NAME IN PRINTNAM

AND TDFORM IN TDFORM

ORDER BY TDFORM.

ENDFORM. "SELECT_DATA

&----


*& Form PRINT_DATA

&----


FORM PRINT_DATA.

FORMAT COLOR 3.

WRITE: 'Program', 18 'Form', 50 'Last Program Flag'.

FORMAT COLOR OFF.

SKIP 1.

IF NOT T_TTXFP[] IS INITIAL.

SORT T_TTXFP BY PRINT_NAME.

LOOP AT T_TTXFP.

IF T_TTXFP-LAST_PROG EQ 'X'.

FORMAT COLOR 4.

WRITE:/ T_TTXFP-PRINT_NAME, 18 T_TTXFP-TDFORM, 60 T_TTXFP-LAST_PROG.

FORMAT COLOR OFF.

ELSE.

WRITE:/ T_TTXFP-PRINT_NAME, 18 T_TTXFP-TDFORM, 60 T_TTXFP-LAST_PROG.

ENDIF.

ENDLOOP.

ENDIF.

ENDFORM. "PRINT_DATA

Thanks

Seshu

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

You can get the program name by using the function module SAPSCRIPT_SELECT_PROGRAM.

But you know, while running the Script, it will trigger the Output type, based on the output type it will trigger the Driver prgoram then the layout program,

coming to your production system, there might be large data, check out that one

regards

Sudheer

Former Member
0 Kudos

Hi,

For FI module the data is not stored in TNAPR.

To get all the print prograns for a sapscript

1) use this function module and specify the form name:-

SAPSCRIPT_SELECT_PROGRAM

2)Or goto se11 and display contents of table TTXFP specifying the form name field

Also Check FM SAPSCRIPT_USELIST_LIST_PROGS and table TTXFP.

Cheers

VJ

Message was edited by:

Vijayendra Rao