Anda di halaman 1dari 12

form programm_aufrufen using us_screen type c.

data: ronam fonam pgnam temp_nast data: lv_sform lv_formtype lv_index lv_screen like like like like tnapr-ronam, tnapr-fonam, tnapr-pgnam, nast.

type type type type

seoattname, seoattname, c, c.

field-symbols: <lv_sform> type na_fname, <lv_formtype> type na_formtype. * shall those NAST records be processed at all? data us_subrc like sy-subrc. call function 'NAST_PROTOCOL_INITIALIZE'. perform check_kappls_not_to_process using nast-kappl "excluded records us_subrc. check us_subrc eq 0. * don't process locked entries (but don't perform this check * in preview mode)

if us_screen ne on. returncode = 3. check nast-snddr eq space. endif. if nast-nacha = '1' and nast-tdreceiver is initial. nast-tdreceiver = nast-usnam. endif. *tnapr = tnapr. * try to perform all routines in TNAPR (RONAM - RONAM5) do 5 times varying ronam from *tnapr-ronam next *tnapr-ronam2 varying fonam from *tnapr-fonam next *tnapr-fonam2 varying pgnam from *tnapr-pgnam next *tnapr-pgnam2. check pgnam ne space. enhancement-point ehp_programm_aufrufen_02 spots es_rsnast00. *$*$-Start: EHP_PROGRAMM_AUFRUFEN_02-----------------------------------------------------------$*$* ENHANCEMENT 2 VN_SFWS_SC1_RSNAST00. "active version * Instead of putting the complete DOENDDO stuff into an enhancement section, we enrich TNAPR * regarding fields SFORM and FORMTYPE manually w/o utilizing additional VAR YING statements lv_index = sy-index. unassign <lv_sform>. unassign <lv_formtype>. lv_sform = '*TNAPR-SFORM'. lv_formtype = '*TNAPR-FORMTYPE'. if lv_index gt 1. concatenate lv_sform lv_index into lv_sform. concatenate lv_formtype lv_index into lv_formtype. endif. assign (lv_sform) to <lv_sform>. assign (lv_formtype) to <lv_formtype>. if <lv_sform> is assigned. tnapr-sform = <lv_sform>. else. clear tnapr-sform. endif. if <lv_formtype> is assigned. tnapr-formtype = <lv_formtype>. else. clear tnapr-formtype. endif. ENDENHANCEMENT. *$*$-End: EHP_PROGRAMM_AUFRUFEN_02-----------------------------------------------------------$*$*

tnapr-ronam = ronam. tnapr-fonam = fonam. tnapr-pgnam = pgnam. if tnapr-ronam ne space or tnapr-pgnam ne space. * initial protocol entry for this processing program call * note: if no further protocol entries exist, this entry alone * will not be saved by NAST_PROTOCOL_STORE sy-msgid = 'VN'. sy-msgno = '056'. sy-msgty = 'I'. sy-msgv1 = tnapr-pgnam. condense sy-msgv1 no-gaps. sy-msgv2 = tnapr-ronam. condense sy-msgv2 no-gaps. call function 'NAST_PROTOCOL_UPDATE' exporting msg_arbgb = sy-msgid msg_nr = sy-msgno msg_ty = sy-msgty msg_v1 = sy-msgv1 msg_v2 = sy-msgv2 exceptions others = 0. endif. * set function module if not yet available * (extra module to have an alternative print engine) * for printing only: if nast-nacha eq '1'. * set function module if not yet available * (extra module to have an alternative print engine) if nast-pfld5 ne space. tnapr-funcname = nast-pfld5. endif. endif. * for printing and faxing: if nast-nacha eq '1' or nast-nacha eq '2'. * set SAPscript form if specified in NAST record if nast-pfld4 ne space. tnapr-fonam = nast-pfld4. endif. endif. * override smart form name, if applicable if nast-pfld3 ne space. tnapr-sform = nast-pfld3. endif. returncode = 999.

* save original NAST record temp_nast = nast. * even repeated processing should get VSTAT = 0 in order to * have a consistent behaviour throughout all processing techniques * nast-vstat = '0'. if nast-kappl eq 'V1'. * Set initialization-flag for sales messages on demand lv_screen = us_screen. if cl_ops_switch_check=>sd_sfws_sc1( ) ne space and us_screen eq 'W'. * If EHP2 BF is active, treat W as X within this init step lv_screen = on. endif. if lv_screen ne on. * Only access SD database tables, no buffer call function 'RV_PRICE_PRINT_GET_BUFFER' exporting i_print_from_buffer = 'A'. endif. endif. perform (tnapr-ronam) in program (tnapr-pgnam) using returncode us_screen if found. * restore original NAST record (in case TNAPR-RONAM changed something) nast = temp_nast. * return code unchanged: program didn't behave properly if returncode = 999. syst-msgid = 'VN'. syst-msgno = 068. syst-msgty = 'E'. syst-msgv1 = tnapr-ronam. syst-msgv2 = tnapr-pgnam. call function 'NAST_PROTOCOL_UPDATE' exporting msg_arbgb = syst-msgid msg_nr = syst-msgno msg_ty = syst-msgty msg_v1 = syst-msgv1 msg_v2 = syst-msgv2 exceptions others = 0. endif. if returncode ne 0. exit. endif. enddo. tnapr = *tnapr. endform.


Bin ----

mseg -matnr werks lifnr

KOTP410 - matnr werks lifnr knumh





How to assign the zpage formats created in SPAD into transport request???. Pls help.

unlike Reports or any other document the Transport Request is not displayed for Workflow Template from standard transaction or any transaction by giving the Template number.

How to get it? In SAP everything is a table Entry and we had to find that particular table. After much searching we found the Table E071 that will suffice our requirement.

Lets check this table from SE16. We know the Standard Task number 99900306 and the Object Type as PDTS. This we have found by doing some trial and error method in this table.

Put PDTS in the field Object Type and 99900306(Standard Task Id) as Object Name.

We got the relevant entry and hence end our much-awaited search.