Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

script: simple question

Former Member
0 Likes
794

Hi Experts,

i want to join my layout & standard prog and my sub-routine pool program. how to do it.

correct answers will be appericiated.

regards,

Sunita.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
710

Hi Sunitha,

You can link the layout and print program in the NACE transaction.

The Tcode NACE is used to link the Standard SAP forms (SCRIPTFORM or SMARTFORM) or the customized form or the new form to its respective print programs. Also the output types, Form entry are linked with their forms and print programs. In short term, i can tell u that configuration or customization of forms to print programs, assigning output types, form entry to the forms are done using this Tcode.

NACE is used to create output type while creating the output type you will mention forms, and driver program.

that will be maintained in the table TNAPR.if you create the output type using NACE then it will be automatically visible in table NAST and TNAPR. So check in NAST, TNAPR table

Follow this sample example

Goto Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.

http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1989fe43b111d1896f0000e8322d00/frameset.htm

NACE is used for message control customizing.

http://help.sap.com/saphelp_nw04/helpdata/en/c8/198a1843b111d1896f0000e8322d00/frameset.htm

Hope this helps you.

Regards,

Chandra Sekhar

5 REPLIES 5
Read only

Former Member
0 Likes
710

Hi

Use tcode - NACE and follow procedure as follows

1)Choose Application from list(eg PO)

2)Click OP type

3)Chose one OP type from Right pane.

4)Click on processing routines

and attach driver program and scriptname to processing routine.

With Regards

Nikunj Shah

Read only

Former Member
0 Likes
710

Hi Sunita,

Can you elaborate your question?

Regards,

Swapna.

Read only

Former Member
0 Likes
711

Hi Sunitha,

You can link the layout and print program in the NACE transaction.

The Tcode NACE is used to link the Standard SAP forms (SCRIPTFORM or SMARTFORM) or the customized form or the new form to its respective print programs. Also the output types, Form entry are linked with their forms and print programs. In short term, i can tell u that configuration or customization of forms to print programs, assigning output types, form entry to the forms are done using this Tcode.

NACE is used to create output type while creating the output type you will mention forms, and driver program.

that will be maintained in the table TNAPR.if you create the output type using NACE then it will be automatically visible in table NAST and TNAPR. So check in NAST, TNAPR table

Follow this sample example

Goto Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.

http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1989fe43b111d1896f0000e8322d00/frameset.htm

NACE is used for message control customizing.

http://help.sap.com/saphelp_nw04/helpdata/en/c8/198a1843b111d1896f0000e8322d00/frameset.htm

Hope this helps you.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
710

hi sunita,

you can do the same by making a program in se38 which is basically the subroutine program i.e for all forms and se71 script editors just call it by perform.

example :-

Hi Sunita,

In SE38 you can write your perform as

&----


*& Form GET_DETAILS

&----


----


  • -->IN_TAB text

  • -->OUT_TAB text

----


FORM get_details TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

----


  • Workareas and Variables Declaration

----


DATA : wa_namp1 LIKE t001s,

wa_telf1 LIKE fsabe,

l_bukrs LIKE mhnk-bukrs,

l_kunnr LIKE mhnk-kunnr,

l_busab LIKE knb1-busab.

----


  • Reading Data From Sapscript

----


READ TABLE in_tab WITH KEY name = 'MHNK-BUKRS'.

IF sy-subrc = 0 .

MOVE in_tab-value TO l_bukrs.

ENDIF.

READ TABLE in_tab WITH KEY name = 'MHNK-KUNNR'.

IF sy-subrc = 0 .

MOVE in_tab-value TO l_kunnr.

ENDIF.

----


  • FM to Convert Data From Sapscript

----


CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = l_kunnr

IMPORTING

output = l_kunnr.

----


  • Fetching the Clerk Number

----


SELECT busab

FROM knb1 UP TO 1 ROWS

INTO l_busab

WHERE kunnr = l_kunnr AND bukrs = l_bukrs.

ENDSELECT.

----


  • FM for getting Credit Analyst Name,phone and email.

----


CALL FUNCTION 'CORRESPONDENCE_DATA_BUSAB'

EXPORTING

i_bukrs = l_bukrs

i_busab = l_busab

IMPORTING

e_t001s = wa_namp1

e_fsabe = wa_telf1.

----


  • Read subroutine parameters and store in variables.

----


READ TABLE out_tab WITH KEY name = 'L_SNAME'.

IF sy-subrc = 0 .

MOVE wa_namp1-sname TO out_tab-value.

MODIFY out_tab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab WITH KEY name = 'L_TELF1'.

IF sy-subrc = 0 .

MOVE wa_telf1-telf1 TO out_tab-value.

MODIFY out_tab INDEX sy-tabix.

ENDIF.

ENDFORM. "get_details

whereas in SAP script SE71 you can write

/:perform get_details in program "Program name in SE38"

/: Using &MHNK-BUKRS&

/: Using &MHNK-KUNNR&

/: Changing &L_SNAME&

/: Changing &L_TELF1&

/:endform.

if you still have doubt please feel free to contact me.

Thanks

Ankur

Read only

Former Member
0 Likes
710

hi Sunita,

For joining SAP script with standard program you can do using SPRO or NACE transaction no need to join subroutine program as it automatically get joined by perform in script. In SPRO their is place based on which standard script you are changing you have to put your script name instead of standard one.

Thanks

Ankur

Edited by: Ankur Sharma on Jul 23, 2008 7:21 AM