Medruck change
Hi,
Any one can help me in changing of <b>company logo and address in Medruck, with SAP scripts and in SMARTFORMS</b> with detailed information.
You can send your views to '[email protected]'.
Thanks in advance.
-Muraly
Hi,
Any one can help me in changing of <b>company logo and address in Medruck, with SAP scripts and in SMARTFORMS</b> with detailed information.
You can send your views to '[email protected]'.
Thanks in advance.
-Muraly
Similar Messages
-
Medruck changing eket-eindt with subroutine
Hello!
I want to read the field eket-eindt from a subroutine and changing it in the form medruck (which I have modified).
But this is not my problem - it works fine.
I get the value of eket-eindt in my form, but in that way: '20061016' now I want the format: '16.10.2006'!
I have tried to format the print with:
SET LANGUAGE ...
SET DATA MASK ...
but nothing works.
I think it doesn't work, because from subroutines you only get text-fields and not data-fields. So the form medruck doesn't have the information that eket-eindt is a data-field...
Have any one a solution for me?hi,
u can try this code.
eket-eindt
data date1(10) type c.
write eket-eindt to date1 use edit mask '__/__/____'.
now u can write date1.
r else
eket-eindt = date1.
u can write eket-eindt .
regards.
sriram. -
i have modified medruck standard script,
i have few things to be done.
1) how can we change or rather control format of text printed at me22n application level in item text tab.
in print preview i want to control the format of the text .
2) while my address is getting printed , i am getting a line gap in between the street and city. how to avoid this line gap on the output print preview
3) are there tax code details in the script of medruck. if yes, then please let me know the text elements corresponding to tax display.Hi
These should be the steps to be done:
- Create a new form ZMEDRUCK as copy of MEDRUCK
- Change the window where the e-mail id has to be placed in this way:
---> Routine to search the mail id (without to change the main program)
/: PERFORM SEARCH_MAIL IN PROGRAM Z<PROGRAM>
/: USING &LFA1-ADRNR&
/: CHANGING &ADR6-SMTP_ADDR&
---> Print mail id
&ADR6-SMTP_ADDR&
- Create the program Z<PROGRAM> and insert the routine SEARCH_MAIL:
FORM SEARCH_MAIL TABLES IN_TAB TRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
READ TABLE IN_TAB WITH KEY NAME = 'LFA1-ADRNR'.
IF SY-SUBRC = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = IN_TAB-VALUE
IMPORTING
OUTPUT = _ADRNR.
SELECT * FROM ADR6 WHERE ADDRNUMBER = _ADRN.
EXIT.
ENDSELECT.
READ TABLE OUT_TAB WITH KEY NAME = 'ADR6-SMTP_ADDR'.
IF SY-SUBRC = 0.
OUT_TAB-VALUE = ADR6-SMTP_ADDR.
MODIFY OUT_TAB INDEX SY-TABIX.
ENDIF.
ENDIF.
ENDFORM.
- Create a new window where it places the logo.
- Replace the new form ZMEDURCK instead of MEDRUCK by NACE trx
Max -
Changes to medruck to display full consignee address.
Hi all,
We have copied the medruck as a zmedruck form and made changes to it. Now our requirement is that the complete consignee address(ship-to-address) has to be printed.
Plese guide me in getting it done.
Thanks in advance,
NeelaHi,
From the pekko table using adrnr we have pulled data from sadr table. Which field of ekpa has to be used to get data from lfa1 table. Pls guide me through.
Thanks in advance,
Neela
Edited by: Neela M B on Oct 18, 2010 12:39 PM
Edited by: Neela M B on Oct 18, 2010 12:40 PM -
In runtime i want change the font of form of medruck
hi expects,
in runtime i want change the font of form of medruck.is it possible?You can do that by puuting the line you want to change in the condition and on the basis of the condition selected , display your line of script.
Line can have your character format.
Otherwise not.
Regards,
Amit
reward all helpful replies. -
hi folks,
i am working on scripts now and i hv to do modification to the script zmedr (a copied version of medruck).
now i hv to change the address.
so can anyone please tell me what is the process i have to follow please.
thanks in advance.Hi,
enter the transacion SE71 in that screen
menubar utilities-->copy from client click on that.
enter the fomr name MEDRUCK
enter the target form name ZMEDRUCK.
clikc on execute. it will be coppied to your ZMEDRUCK. and come back to SE71 screen and click on change.
in next screen click on page windows in application menu bar.
it will display the windows and double click on ADDRESS window again click on text elements(menu bar EDIT-->TEXT ELEMENTS(F9)). there you can change the address whatever you want in change editor screen. after changes in your ZMEDRUCK save it and activate it.
enter NACE transaction code. select application EF for purchase order and click on output types in application tool bar
it will display the different output types in next screen
select output type as NEW and double click on processing routines.
remove the form name MEDRUCK and enter your form name ZMEDRUCK in first line in the next screen. save it.
finally enter ME23N transaction code enter purchase order number and click on messages in application tool bar
enter output type as NEW and mediup print output press enter
and click on further data in application tool bar select send immedeatly in next screen save it and back again click on communication method enter your form name in the last input field of that screen. save and enter and finally save it. it comes back to initial screen (ME23N) click on print priview in application tool bar. select output type in next screen press enter it asks you print or print preview and click on print preview.
there you can see your changes in pruchase order.
Regards.
sriram. -
Changing Main window tet elements of MEDRUCK?
Hi all,
I am doing sap script to display PO . I copied MEDRUCK and created the form.
But it is giving only one line item details in the output. The mistake i did is , i totally commented the
code of standard form and written own code with out any standard text elements.
Is it possible to display all items in above procedure ? Else how to know where to modify the standard code.
Please explain clearly as i have no idea on this text elements of standard form.
Thanks,
Vamshi.Purchasing/MEDRUCK is a bit complicated. Different conditions will trigger different text elements (stock items vs consignment, free vs cost, etc). Unless you change the print programs you can't have everything print from one element. I'd suggest only commenting out things you fully understand and know you do not need (don't comment out the text element itself, just the contents).
-
How to change stnadrd smartform..medruck..
Hi all,
How to change stnadrd smartform..medruck..
I want to change MEDRUCK form..
How can this be done..
can it be done in NACE...how
<<Text removed by moderator>>
Thanx,
Bhakti
Edited by: Matt on Nov 7, 2008 8:19 AMyes medruck is a script.
Create a Z copy of it and if u want smartform now convert ur Zscript to form in following way.
Migrating a SAPscript form
1. Go to the SAP Smart Forms initial screen (transaction SMARTFORMS ).
2. In the Form field enter the name of the Smart Form you want to create.
3. Choose Utilities Migrate SAPscript form.
The dialog window Migrate SAPscript Form appears.
4. Enter the name and the language of the source form (SAPscript).
5. Choose Enter.
This takes you to the change mode of the SAP Form Builder.
If the selected SAPscript form does not exist in the selected language, a dialog window appears on which you can select one of the existing languages.
6. Now change the design of the form and of the form logic. To activate the Smart Form choose Activate.
Now in nace assign ur smartform to the output type u want -
Medruck script Item line changes
Hi
how to track changes in item line when ever changes are made in item level in which strucutre or special fields it stores tht value.Hi,
The item changes can be tracked using the CDHDR (for header changes) and CDPOS (item changes)tables.
The object class OBJECTCLAS has to be passed as 'EINKBELEG' for Purchase orders. And the object id OBJECTID has to be the purchase order number.The TABNAME field has to contain the table name (EKKO in the case of purchase orders).
Check the below FM also:
CHANGEDOCUMENT_READ_HEADERS
CHANGEDOCUMENT_READ_POSITIONS
Thanks. -
Hi
I have copied the MEDRUCK and made new sap script for our customised purchase order.
My problem is in the line items basic price/unit i.e RM06P-NETWRV is showing zero for all materials where as in details everything fine
What can be the problem. I have debugged the above script and unable to find the solution.
regards
sateeshHi Sateesh,
Is the field name is NETWR or NETWRV ?
I hope you have done the customization of the new layout you copied.
Thanks
Sravan -
Change indicator of PO for Medruck PO sapscript
Dear All,
Is there fields so that I can understand that this form is printed for Changed existing PO. So that I need to change the header..
If any one know any update flag indicator, your input will be very helpful.
Thanks
Subhankar'Hello,
do you find a sollution for this problem?
We have the same problem.
regards! -
Hi All,
I have replaced standard script(MEDRUCK) with Zsmart form for PO printing. when user change in any line of PO, like he have changed quantity. for this change a text message as **PO quantity changed** print in standard script. Now I want print this text message in my smart form . I know this is the message field T166T-CHTXT but i cant find any relation between this text messege and PO line item. So plz tell me how can i print it my smart form. I am sending u the programe where i have put my smart form.
INCLUDE FM06PE02 *
form entry_neu using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
***to get the data not given by the above function module
***as, on some std conditions some data may be deleted by the same.
SELECT * FROM EKPO INTO TABLE l_doc-XEKPO
WHERE EBELN EQ l_doc-XEKKO-EBELN AND
LOEKZ NE 'L'.
IF l_doc-XTKOMV IS INITIAL.
SELECT * FROM KONV INTO TABLE l_doc-XTKOMV
WHERE KNUMV EQ l_doc-XEKKO-KNUMV.
ENDIF.
call function 'ME_PRINT_PO'
exporting
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
importing
ex_retco = ent_retco.
data: l_komk type komk occurs 0 with header line.
DATA: lf_fm_name TYPE rs38l_fnam.
TYPES: BEGIN OF TP_RECORD,
EBELP TYPE EKPO-EBELP,
KNUMH TYPE KONP-KNUMH,
END OF TP_RECORD.
data: CD_record type TP_RECORD OCCURS 0 WITH HEADER LINE.
TYPES: BEGIN OF TP_TAX,
EBELP TYPE EKPO-EBELP,
KSCHL TYPE KONP-KSCHL,
KBETR TYPE KONP-KBETR,
KONWA TYPE KONP-KONWA,
VTEXT type T685T-VTEXT,
END OF TP_TAX.
DATA: TAB_TAX TYPE TP_TAX OCCURS 0 WITH HEADER LINE.
data: wa_ekpo type ekpo,
wa_komv type komv,
wa_pekpo type pekpo.
DATA: T_ITEM TYPE STANDARD TABLE OF ZMM_PO_ITEM WITH HEADER LINE.
data: l_VAKEY type KONH-VAKEY,
l_KNUMH type KONH-KNUMH.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: lf_formname TYPE tdsfname.
DATA: ls_addr_key LIKE addr_key.
DATA: ls_job_info TYPE ssfcrescl.
DATA: ls_arc_params TYPE ARC_PARAMS.
DATA: ls_MAIL_APPL_OBJ TYPE swotobjid.
DATA: INPUT TYPE SSFCOMPIN.
DATA: RESULT TYPE SSFCRESOP.
DATA: SECESS TYPE KONP-KBETR .
loop at l_doc-XEKPO into wa_ekpo.
refresh CD_RECORD.
*****GET TAXES FOR MATERIAL *************************
if wa_ekpo-matnr is not initial.
select knumh from A363 into corresponding fields of CD_RECORD
WHERE KAPPL = 'TX' AND
WERKS = WA_EKPO-WERKS AND
LIFNR = l_doc-XEKKO-LIFNR AND
MATNR = WA_EKPO-MATNR AND
DATBI GE l_doc-XEKKO-BEDAT.
CD_RECORD-EBELP = wa_ekpo-EBELP.
append CD_RECORD.
endselect.
if CD_RECORD[] is not initial.
SELECT KSCHL KBETR KONWA FROM KONP INTO CORRESPONDING FIELDS OF TAB_TAX
FOR ALL ENTRIES IN CD_RECORD
WHERE KNUMH = CD_RECORD-KNUMH AND
LOEVM_KO NE 'X'.
TAB_TAX-EBELP = wa_ekpo-EBELP.
if TAB_TAX-KONWA = '%'.
TAB_TAX-KBETR = TAB_TAX-KBETR / 10.
endif.
SELECT SINGLE VTEXT FROM T685T INTO TAB_TAX-VTEXT
WHERE SPRAS = 'EN' AND
KAPPL = 'TX' AND
KSCHL = TAB_TAX-KSCHL.
APPEND TAB_TAX.
ENDSELECT.
endif.
endif.
****GET TAXES FOR MATERIAL GROUP************************
refresh CD_RECORD.
if wa_ekpo-matkl is not initial.
if wa_ekpo-knttp eq 'K' .
select knumh from A700 into corresponding fields of CD_RECORD
WHERE KAPPL = 'TX' AND
WERKS = WA_EKPO-WERKS AND
MATKL = WA_EKPO-MATKL AND
DATBI GE l_doc-XEKKO-BEDAT AND
LIFNR EQ L_DOC-XEKKO-LIFNR .
CD_RECORD-EBELP = wa_ekpo-EBELP.
append CD_RECORD.
endselect.
if CD_RECORD[] is not initial.
SELECT KSCHL KBETR KONWA FROM KONP INTO CORRESPONDING FIELDS OF TAB_TAX
FOR ALL ENTRIES IN CD_RECORD
WHERE KNUMH = CD_RECORD-KNUMH AND
LOEVM_KO NE 'X'.
TAB_TAX-EBELP = wa_ekpo-EBELP.
if TAB_TAX-KONWA = '%'.
TAB_TAX-KBETR = TAB_TAX-KBETR / 10.
endif.
SELECT SINGLE VTEXT FROM T685T INTO TAB_TAX-VTEXT
WHERE SPRAS = 'EN' AND
KAPPL = 'TX' AND
KSCHL = TAB_TAX-KSCHL.
APPEND TAB_TAX.
ENDSELECT.
endif.
endif.
endif.
endloop.
******Fill T_ITEM***************
loop at l_doc-XEKPO into wa_ekpo.
CLEAR T_ITEM.
MOVE-CORRESPONDING wa_ekpo TO T_ITEM.
MOVE WA_EKPO-EMATN TO T_ITEM-MATNR.
********Field NETPR (net price) used for Gross price per piece**
SELECT SINGLE KBETR FROM KONV
INTO T_ITEM-NETPR
WHERE KNUMV EQ l_doc-XEKKO-KNUMV AND
KPOSN EQ wa_ekpo-EBELP AND
KSCHL EQ 'P000'.
LOOP AT l_doc-xtkomv INTO WA_KOMV
where KPOSN = T_ITEM-EBELP AND
( ( KSCHL = 'P000' AND KBETR IS NOT INITIAL ) OR
( KSCHL = 'P001' AND KBETR IS NOT INITIAL ) OR
( KSCHL = 'PB00' AND KBETR IS NOT INITIAL ) OR
( KSCHL = 'PBXX' AND KBETR IS NOT INITIAL ) ).
MOVE WA_KOMV-KBETR TO T_ITEM-NETPR.
ENDLOOP.
*******Get Discount************************
LOOP AT l_doc-xtkomv INTO WA_KOMV
where KPOSN = T_ITEM-EBELP AND
( ( KSCHL = 'R000' AND KBETR IS NOT INITIAL ) OR
( KSCHL = 'R001' AND KBETR IS NOT INITIAL ) OR
( KSCHL = 'R002' AND KBETR IS NOT INITIAL ) ).
T_ITEM-C_DSCNT = WA_KOMV-WAERS.
T_ITEM-DSCNT = WA_KOMV-KBETR.
IF T_ITEM-C_DSCNT NE 'INR'.
T_ITEM-DSCNT = T_ITEM-DSCNT / 10.
ENDIF.
ENDLOOP.
*******Get Taxes**************************
LOOP AT TAB_TAX
WHERE EBELP = T_ITEM-EBELP.
CASE TAB_TAX-KSCHL.
WHEN 'JMOP' OR 'JMOQ' OR 'JSRT'.
IF TAB_TAX-KBETR IS NOT INITIAL.
T_ITEM-EXCSE = TAB_TAX-KBETR.
T_ITEM-C_EXCSE = TAB_TAX-KONWA.
T_ITEM-KSCHL = TAB_TAX-KSCHL .
ENDIF.
WHEN 'JEC1' OR 'JEC3'.
IF TAB_TAX-KBETR IS NOT INITIAL.
T_ITEM-CESS = TAB_TAX-KBETR.
T_ITEM-C_CESS = TAB_TAX-KONWA.
T_ITEM-KSCHL = TAB_TAX-KSCHL .
ENDIF.
WHEN 'JVRD' OR 'JIPC'.
IF TAB_TAX-KBETR IS NOT INITIAL.
T_ITEM-VAT_CST = TAB_TAX-KBETR.
T_ITEM-C_VAT_CST = TAB_TAX-KONWA.
T_ITEM-KSCHL = TAB_TAX-KSCHL .
ENDIF.
WHEN 'JES1' .
IF TAB_TAX-KBETR IS NOT INITIAL.
SECESS = TAB_TAX-KBETR.
T_ITEM-C_SECESS = TAB_TAX-KONWA.
T_ITEM-KSCHL = TAB_TAX-KSCHL .
ENDIF.
ENDCASE.
ENDLOOP.
********Get Delivery Date*****************
read table l_doc-XPEKPO into wa_pekpo with key ebelp = WA_EKPO-EBELP.
T_ITEM-EINDT = WA_PEKPO-EINDT.
if l_doc-XEKKO-BSTYP = 'L'.
Get Price Per Unit For Scheduling agreement********
concatenate T_ITEM-EBELN T_ITEM-EBELP INTO l_VAKEY.
SELECT SINGLE KNUMH FROM KONH INTO L_KNUMH
WHERE VAKEY = l_VAKEY.
SELECT SINGLE KBETR FROM KONP INTO T_ITEM-NETPR
WHERE KNUMH = L_KNUMH AND
KSCHL = 'P000'.
Get Discount For Scheduling agreement ********
SELECT SINGLE KBETR KONWA FROM KONP INTO (T_ITEM-DSCNT,T_ITEM-C_DSCNT)
WHERE KNUMH = L_KNUMH AND
KSCHL = 'R000'.
if sy-subrc <> 0.
SELECT SINGLE KBETR KONWA FROM KONP INTO (T_ITEM-DSCNT,T_ITEM-C_DSCNT)
WHERE KNUMH = L_KNUMH AND
KSCHL = 'R001'.
if sy-subrc <> 0.
SELECT SINGLE KBETR KONWA FROM KONP INTO (T_ITEM-DSCNT,T_ITEM-C_DSCNT)
WHERE KNUMH = L_KNUMH AND
KSCHL = 'R002'.
endif.
endif.
if T_ITEM-DSCNT is not initial.
T_ITEM-DSCNT = T_ITEM-DSCNT / 10.
endif.
endif.
APPEND T_ITEM.
endloop.
IF TNAPR-SFORM IS NOT INITIAL.
SmartForm from customizing table TNAPR
lf_formname = tnapr-sform.
determine smartform function module for PO
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.
ENDIF.
CALL FUNCTION 'SSF_CREATE_COMPOSER_INPUT'
EXPORTING
ARCHIVE_PARAMETERS = ls_arc_params
USER_SETTINGS = 'X'
MAIL_SENDER = ls_sender
MAIL_RECIPIENT = ls_recipient
MAIL_APPL_OBJ = ls_MAIL_APPL_OBJ
OUTPUT_OPTIONS = ls_composer_param
CONTROL_PARAMETERS = ls_control_param
IMPORTING
INPUT = input.
CALL FUNCTION 'SSFCOMP_OPEN'
EXPORTING
INPUT = input
IMPORTING
RESULT = RESULT
EXCEPTIONS
ERROR = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_control_param-no_open = 'X'.
ls_control_param-no_close = 'X'.
CALL FUNCTION lf_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS = ls_arc_params
CONTROL_PARAMETERS = ls_control_param
MAIL_APPL_OBJ = ls_MAIL_APPL_OBJ
MAIL_RECIPIENT = ls_recipient
MAIL_SENDER = ls_sender
OUTPUT_OPTIONS = ls_composer_param
USER_SETTINGS = 'X'
ZXEKKO = l_doc-XEKKO
ZXPEKKO = l_doc-XPEKKO
SECESS = SECESS
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
L_XEKPO = l_doc-XEKPO
L_XEKPA = l_doc-XEKPA
L_XPEKPO = l_doc-XPEKPO
L_XEKET = l_doc-XEKET
L_XTKOMV = l_doc-xtkomv
L_XEKKN = l_doc-Xekkn
L_XEKEK = l_doc-Xekek
L_XKOMK = l_komk
T_ITEM = T_ITEM
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.
CALL FUNCTION 'SSFCOMP_CLOSE'
IMPORTING
RESULT =
EXCEPTIONS
ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ELSE.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
ENDIF.
endform. "entry_neu
*eject
Umlagerungsbestellung, Hinweis 670912 *
form entry_neu_sto using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print,
F_STO. "670912
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
F_STO = 'X'. "670912
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
ix_sto = F_STO "670912
IMPORTING
ex_retco = ent_retco.
endform. "entry_neu_sto
*eject
Mahnung
form entry_mahn using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
l_druvo = '3'.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
endform. "entry_mahn
*eject
Auftragsbestätigungsmahnung
form entry_aufb using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
l_druvo = '7'.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
endform. "entry_aufb
*eject
Lieferabrufdruck für Formular MEDRUCK mit Fortschrittszahlen
form entry_lphe using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_xfz,
l_doc type meein_purchase_doc_print.
data: l_komk type komk occurs 0 with header line.
DATA: lf_fm_name TYPE rs38l_fnam.
DATA: T_EKET TYPE TABLE OF EKET WITH HEADER LINE,
T_EKET_NEW TYPE TABLE OF EKET WITH HEADER LINE.
DATA: WA_EKET TYPE EKET,
WA_EKET_NEW TYPE EKET.
DATA: L_DATE TYPE RM06B-EEIND,
MAX_ABRUF TYPE EKEK-ABRUF.
DATA: T_DEL_SCH TYPE TABLE OF ZSTR_DEL_SCH WITH HEADER LINE.
DATA: WA_EKPO TYPE EKPO,
WA_EKEK TYPE EKEK.
DATA: TEMP_DATE LIKE SY-DATUM,
TEMP_MONTH TYPE SPMON,
THIS_MONTH TYPE SPMON,
NEXT_MONTH TYPE SPMON,
NEXT_NEXT_MONTH TYPE SPMON,
L_DAY(2) TYPE N.
DATA: QTY_TEMP TYPE I.
DATA: MDPAX TYPE MDPA,
MDPMX TYPE TABLE OF MDPM WITH HEADER LINE,
MDSBX TYPE TABLE OF MDSB WITH HEADER LINE.
DATA: lf_formname TYPE tdsfname.
clear ent_retco.
l_druvo = '9'.
l_xfz = 'X'.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
exporting
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_xfz = l_xfz
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
importing
ex_retco = ent_retco.
*T_EKET[] = l_doc-XEKET[].
LOOP AT l_doc-XEKET INTO WA_EKET.
CLEAR: WA_EKET_NEW,
T_EKET_NEW.
CASE WA_EKET-LPEIN.
WHEN '2'.
T_EKET_NEW = WA_EKET.
WA_EKET_NEW = WA_EKET.
T_EKET_NEW-MENGE = WA_EKET-MENGE DIV 2.
QTY_TEMP = WA_EKET-MENGE DIV 2.
T_EKET_NEW-MENGE = QTY_TEMP.
CALL FUNCTION 'COS6_QUANTITY_ROUND'
EXPORTING
I_QUANTITY = T_EKET_NEW-MENGE
I_UNIT = 'EA'
IMPORTING
E_QUANTITY = T_EKET_NEW-MENGE
EXCEPTIONS
UNIT_NOT_DEFINED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND T_EKET_NEW.
WRITE WA_EKET-EINDT TO L_DATE USING EDIT MASK '__.__.____'.
CALL FUNCTION 'DATE_IN_FUTURE'
EXPORTING
ANZAHL_TAGE = '6'
IMPORT_DATUM = L_DATE
IMPORTING
EXPORT_DATUM_EXT_FORMAT = WA_EKET_NEW-EINDT
EXPORT_DATUM_INT_FORMAT = WA_EKET_NEW-EINDT
WA_EKET_NEW-MENGE = WA_EKET-MENGE - T_EKET_NEW-MENGE.
APPEND WA_EKET_NEW TO T_EKET_NEW.
WHEN '3'.
T_EKET_NEW = WA_EKET.
WA_EKET_NEW = WA_EKET.
T_EKET_NEW-MENGE = WA_EKET-MENGE DIV 2.
APPEND T_EKET_NEW.
CALL FUNCTION 'MM_ARRANG_GET_END_OF_MONTH'
EXPORTING
I_DATUM = WA_EKET-EINDT
IMPORTING
E_DATUM = WA_EKET_NEW-EINDT.
WA_EKET_NEW-MENGE = WA_EKET-MENGE - T_EKET_NEW-MENGE.
APPEND WA_EKET_NEW TO T_EKET_NEW.
WHEN OTHERS.
APPEND WA_EKET TO T_EKET_NEW.
ENDCASE.
ENDLOOP.
THIS_MONTH = SY-DATUM+(6).
CALL FUNCTION 'HR_BR_ADD_MONTH_TO_DATE'
EXPORTING
DMM_DATIN = SY-DATUM
DMM_COUNT = '1'
DMM_OPER = '+'
DMM_POS = '1'
IMPORTING
DMM_DAOUT = TEMP_DATE
EXCEPTIONS
UNKNOWN = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
NEXT_MONTH = TEMP_DATE+(6).
CLEAR TEMP_DATE.
CALL FUNCTION 'HR_BR_ADD_MONTH_TO_DATE'
EXPORTING
DMM_DATIN = SY-DATUM
DMM_COUNT = '2'
DMM_OPER = '+'
DMM_POS = '1'
IMPORTING
DMM_DAOUT = TEMP_DATE
EXCEPTIONS
UNKNOWN = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
NEXT_NEXT_MONTH = TEMP_DATE+(6).
LOOP AT l_doc-XEKPO INTO WA_EKPO.
CLEAR: T_DEL_SCH,
WA_EKEK.
MOVE-CORRESPONDING WA_EKPO TO T_DEL_SCH.
CLEAR MAX_ABRUF.
LOOP AT l_doc-Xekek INTO WA_EKEK.
IF WA_EKEK-ABRUF GT MAX_ABRUF.
MAX_ABRUF = WA_EKEK-ABRUF.
ENDIF.
ENDLOOP.
CLEAR WA_EKEK.
READ TABLE l_doc-Xekek INTO WA_EKEK
WITH KEY EBELN = WA_EKPO-EBELN
EBELP = WA_EKPO-EBELP
ABRUF = MAX_ABRUF.
T_DEL_SCH-LFNKD = WA_EKEK-LFNKD.
LOOP AT T_EKET_NEW
WHERE EBELN = WA_EKPO-EBELN AND
EBELP = WA_EKPO-EBELP.
****GET COMPONENTS***********************
REFRESH: mdpmx, mdsbx.
CLEAR: mdpmx, mdsbx.
on change of t_eket_new-rsnum.
mdpax-rsnum = t_eket_new-rsnum.
mdpax-matnr = wa_ekpo-matnr.
mdpax-pwwrk = wa_ekpo-werks.
CALL FUNCTION 'MD_LESEN_KOMPONENTEN'
EXPORTING
emdpa = mdpax
IMPORTING
imdpa = mdpax
TABLES
mdpmx = mdpmx
mdsbx = mdsbx.
endon.
TEMP_MONTH = T_EKET_NEW-EINDT+(6).
CASE TEMP_MONTH.
WHEN THIS_MONTH.
L_DAY = T_EKET_NEW-EINDT+6(2).
IF L_DAY BETWEEN '01' AND '07'.
T_DEL_SCH-QTYW1 = T_DEL_SCH-QTYW1 + T_EKET_NEW-MENGE.
ELSEIF L_DAY BETWEEN '08' AND '14'.
T_DEL_SCH-QTYW2 = T_DEL_SCH-QTYW2 + T_EKET_NEW-MENGE.
ELSEIF L_DAY BETWEEN '15' AND '22'.
T_DEL_SCH-QTYW3 = T_DEL_SCH-QTYW3 + T_EKET_NEW-MENGE.
ELSE.
T_DEL_SCH-QTYW4 = T_DEL_SCH-QTYW4 + T_EKET_NEW-MENGE.
ENDIF.
T_DEL_SCH-C_QTYM1 = T_DEL_SCH-C_QTYM1 + mdpmx-erfmg.
WHEN NEXT_MONTH.
T_DEL_SCH-QTYM2 = T_DEL_SCH-QTYM2 + T_EKET_NEW-MENGE.
T_DEL_SCH-C_QTYM2 = T_DEL_SCH-C_QTYM2 + mdpmx-erfmg.
WHEN NEXT_NEXT_MONTH.
T_DEL_SCH-QTYM3 = T_DEL_SCH-QTYM3 + T_EKET_NEW-MENGE.
T_DEL_SCH-C_QTYM3 = T_DEL_SCH-C_QTYM3 + mdpmx-erfmg.
ENDCASE.
if mdpmx-matnr is not initial.
T_DEL_SCH-C_MATNR = mdpmx-matnr.
T_DEL_SCH-C_TXZ01 = mdpmx-maktx.
T_DEL_SCH-PSTYP = WA_EKPO-PSTYP.
endif.
ENDLOOP.
T_DEL_SCH-QTYTO = T_DEL_SCH-QTYW1 + T_DEL_SCH-QTYW2 + T_DEL_SCH-QTYW3 + T_DEL_SCH-QTYW4.
APPEND T_DEL_SCH.
CLEAR T_DEL_SCH.
ENDLOOP.
SmartForm from customizing table TNAPR
lf_formname = tnapr-sform.
determine smartform function module for PO
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.
ENDIF.
CALL FUNCTION lf_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = space
ZXEKKO = l_doc-XEKKO
ZXPEKKO = l_doc-XPEKKO
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
L_XEKPO = l_doc-XEKPO
L_XEKPA = l_doc-XEKPA
L_XPEKPO = l_doc-XPEKPO
L_XEKET = T_EKET_NEW
L_XTKOMV = l_doc-xtkomv
L_XEKKN = l_doc-Xekkn
L_XEKEK = l_doc-Xekek
T_DEL_SCH = T_DEL_SCH
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.
ELSE.
*- nast-sndex wird als Kennzeichen für Probedruck verwendet
IF l_nast-kappl EQ 'EL' AND ent_screen IS INITIAL AND
l_from_memory IS INITIAL AND l_nast-sndex IS INITIAL.
missing environment for limiting update print dependend data
IF sy-ucomm NE '9ANZ' AND sy-ucomm NE '9DPR'.
PERFORM update_release TABLES l_doc-xekpo l_doc-xekek l_doc-xekeh
USING l_druvo l_nast-kschl.
ENDIF.
ENDIF.
ENDIF.
endform. "entry_lphe
*eject
****SUBROUTINE COPIED FROM INCLUDE LMEDRUCKF1K BY jithendra 28.12.2006***
*****to change release status of delivery schedule
FORM update_release *
--> t_xekpo *
--> t_xekek *
--> t_xekeh *
--> p_druvo *
--> p_kschl *
FORM update_release TABLES t_xekpo STRUCTURE ekpo
t_xekek STRUCTURE ekek
t_xekeh STRUCTURE ekeh
USING p_druvo
p_kschl.
TABLES: t161m.
CLEAR t161m.
SELECT SINGLE druab INTO t161m-druab FROM t161m
WHERE kvewe = 'B'
AND kappl = 'EL'
AND druvo = p_druvo
AND kschl = p_kschl.
IF NOT sy-subrc = 0 OR NOT t161m-druab = 'X'.
EXIT.
ENDIF.
DELETE t_xekek WHERE webrl EQ '1' OR webrl EQ '2'.
CALL FUNCTION 'ME_UPDATE_FROM_PRINTING'
TABLES
i_ekek = t_xekek
i_ekeh = t_xekeh
i_ekpo = t_xekpo
EXCEPTIONS
OTHERS = 1.
ENDFORM. "update_release
Lieferabrufdruck für Formular MEDRUCK ohne Fortschrittszahlen
form entry_lphe_cd using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
l_druvo = '9'.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
endform. "entry_lphe_cd
*eject
Feinabrufdruck für Formular MEDRUCK mit Fortschrittszahlen
form entry_lpje using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_xfz,
l_doc type meein_purchase_doc_print.
clear ent_retco.
l_druvo = 'A'.
l_xfz = 'X'.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_xfz = l_xfz
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
endform. "entry_lpje
*eject
Feinabrufdruck für Formular MEDRUCK ohne Fortschrittszahlen
form entry_lpje_cd using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
l_druvo = 'A'.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
endform. "entry_lpje_cd
*eject
INCLUDE FM06PE02 *
form entry_neu_matrix using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_mflag = 'X'
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
data: l_komk type komk occurs 0 with header line.
DATA: lf_fm_name TYPE rs38l_fnam.
endform. "entry_neu_matrix
*eject
Angebotsabsage
form entry_absa using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
l_druvo = '4'.
clear ent_retco.
call function 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druHi,
Depending on whether you have a Sales order or Purchase order.
If sales order -> then go to NACE -> Sales -> check your Zsmartform
If Purchase order -> go to NACE -> under PO output -> find your Zsmartform.
In both cases, after u find your smartform name, thru change log.
At runtime read what are the header text changes and pass it to the smartform.
You can use FM read_txt for this.
Hope this helps. -
Purchase Order (Medruck)
Hi Expert:
I've requirement to print the text / Comment at the left corner of PO while PO printing ( Copy of Medruck) is being done as
1. Reprint : if again it is being printed
2. Changed PO : if again the printing is being taken after some changes in that particular Purchase order No.
I have logic for 1st case : (processing Status) nast-vstat = '1' and in the 2nd case (Change Message Flag) nast-aende = 'X'
but the problem is, Nast table udpates only after processing I mean after saving. If anyone come out from purchase order after saving and then takes the print out , it works fine other wise no comment / text come if before saving or processing the print out is being taken.
-> From anywhere if the 2nd time or after changing the purchase order, any print out would be taken , would have the respective Comments ( Reprint / Changed PO).
An appreciation for the quick repl and thanks in advance,
Regards
Shashi//2. Changed PO : if again the printing is being taken after some changes in that particular Purchase order No.
For this to get printed in your assignment the change log has to be created for that PO and this will update the Corresponding PO tables like EKKO EKPO and EKET tables .
So the change log for the PO can be handled from tables CDHDR and CDPOS.
at header (EKKO) and item (EKPO) by comparing the same.
So when you are printing the form again and u need to confirm that the particular PO has been changed and then pop the text ( Reprint /<b> Changed PO</b>).
you can access a select on CDHDR and CDPOS , set a flag for this and print the text when the Flag is set .Later clear the Flag.
hope this helps ,
regards,
vijay. -
Hi all
I have requirment in which i have to modify standard script MEDRUCK for PO, RFQ, SCHEDULING AGREEMENT, AND QUANTITY CHART.
I know how to modify standard layouts but after modifying layouts what to do next??
How can i use same medruck script for RFQ, SCHEDULING AGREE, AND QUANTITY CONTRACT.
help me out!!!!!!!!!!hai manisha,
Actually SAP Clubbed all the requriments And Made one FORM for one bussiness scenario.
So Depending On The Transaction That We Are Running System Will Automatically Triggers Particular Type.
So Take A Copy Of Medruck For Each Document That U have To Do.
Then Run Respective Transactions Then According to that configure NACE.
In NACE transaction, We will assign the Form name and the driver program name and the corresponding routine to be triggered in the driver program.
We should be able to tell the system to pick up the desired form layout and trigger the routine and get the data from the database and put it on to the form. All these stuff the system will come to know from the NACE settings.
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
You can view all forms and driver programs for standard SAP Scripts.
Assigning Form and Driver proram to an Output type is as follows.
1) Go to NACE transaction
2) Select an Applicatin(V1-Sales,V2-Shipping,V3-Billing)
3) Click on Outputtypes Button
4) Comes to Change Mode
5) Click on New Entries button
6) Specify Output type,Form name and Program and Save it.
Check these links
/people/venkata.ramisetti/blog/2006/09/21/configuring-output-types-for-pdf-based-print-forms
http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1989fe43b111d1896f0000e8322d00/frameset.htm
Condition records in NACE?
IF Found Helpfull Do Reward.
Regards.
Eshwar. -
How to Change the Document Condition Values in PO print
HI,
I have a requirement to change the document condition values in PO printout. We are using the copied form of MEDRUCK.
Please tell me how can i change the Document Condition Values at run time.
Thanks....hi
hence you have copied standard script you cant able to change the driver program for this you have to use itcsy structure.
go to the page window and select the window which you have the amount field. open the text editor of the windoiw here write
/: PERFORM CONTACT IN PROGRAM ZAMOUNT_ZF110_IN_AVIS1_C
/: USING ®UH-ZALDT&
/: CHANGING &DT&
/: ENDPERFORM
now create a report program with name ZAMOUNT_ZF110_IN_AVIS1_C.
and follow as the example program is .
*& Form CONTACT
text
-->IN_TAB text
-->OUT_TAB text
FORM contact TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA : v_telf1 TYPE telf1.
DATA : v_telfx TYPE telfx.
DATA : v_adrnr TYPE ad_addrnum.
DATA : v_flagcomm6 TYPE ad_flgcm06.
DATA : v_datum(10) TYPE c.
DATA : v_sydatum TYPE sy-datum.
DATA : v_lifnr TYPE lifnr . " Santosh Rawat , 19th Feb
DATA : v_email TYPE ad_smtpadr . " Santosh Rawat , 19th Feb
LOOP AT in_tab.
IF in_tab-name = 'REGUH-LIFNR'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' " Santosh Rawat , 19th Feb
EXPORTING
input = in_tab-value
IMPORTING
output = v_lifnr.
SELECT SINGLE telf1 telfx adrnr FROM lfa1
INTO (v_telf1, v_telfx, v_adrnr)
WHERE lifnr = v_lifnr.
SELECT SINGLE smtp_addr FROM adr6 " Santosh Rawat ,19th Feb
INTO v_email WHERE ADDRNUMBER = v_adrnr. " Santosh Rawat ,19th Feb
SELECT SINGLE flagcomm6 FROM adrc INTO v_flagcomm6
WHERE addrnumber = v_adrnr.
ELSEIF
in_tab-name = 'REGUH-ZALDT' OR in_tab-name = 'REGUP-BLDAT' .
MOVE in_tab-value TO v_datum.
REPLACE ALL OCCURRENCES OF '.' IN v_datum WITH ' '.
CONDENSE v_datum.
MOVE v_datum TO v_sydatum.
*CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'
EXPORTING
input = V_DATUM
IMPORTING
OUTPUT = V_DATUM
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = v_sydatum
IMPORTING
date_external = v_datum
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDLOOP.
LOOP AT out_tab.
IF out_tab-name = 'TEL'.
MOVE v_telf1 TO out_tab-value.
ELSEIF out_tab-name = 'FAX'.
MOVE v_telfx TO out_tab-value.
ELSEIF out_tab-name = 'EMAIL'.
MOVE v_email TO out_tab-value. " Santosh Rawat , 19th Feb
ELSEIF out_tab-name = 'DT'.
MOVE v_datum TO out_tab-value.
ENDIF.
MODIFY out_tab FROM out_tab.
*MODIFY TABLE OUT_TAB .
ENDLOOP.
ENDFORM. }
reply for any query.
regards,
venkat.
Maybe you are looking for
-
Img tag in TextField : a nightmare ?
After reading of the documentation about Flash TextField class (used by Label and Text), I was expected a lot of this component, especially about the img tag. I spent a lot of hours trying to make it working as the doc says. Each time I have runtime
-
Change from prepaid to a monthly account
Can someone please help me switch from a prepaid account to a regular Verizon monthly account please?
-
Photoshop CS6 is downloaded even though the link states Photoshop CS6 Extended.
Hello! A few days ago or so, I had downloaded Photoshop CS6 from the official Adobe site here (http://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop), and wanted to only test it out. However, I did a very stupid thing and uninstalled all my M
-
Overflow SQL*Plus buffer.
Hi, I try to insert default data into a LONG field in a 8i DB by using SQL*Plus; however, I get the following error til I reduce the amount of data to certain size. What I understand is that a LONG field can hold up to 2GB of data, so I believe my pr
-
When exactly can I use "Deauthorize All"?
I am trying to Deauthorize All in my iTunes, but get the message about the one year wait. I am told to wait until Novemver 4th, 2012 to Deauthorize All. Well, it is November 4th, 2012 in all time zones in North America that I am aware of, so when c