cancel
Showing results for 
Search instead for 
Did you mean: 

How to Change the Document Condition Values in PO print

Former Member
0 Kudos

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....

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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 &REGUH-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.

Former Member
0 Kudos

menction in detail to help you more.

Former Member
0 Kudos

Note:- I m using Copy of MEDRUCK for PO Printout.

I have a printout of PO. In it, after the material, some conditions are there like Gross Price with amount.. I want to change that amount at run time...

Since, this is a copy of standard script MEDRUCK, we are unable to change it at debugging time.

Please let me know..

alex_m
Active Contributor
0 Kudos

Why do you want to change that amount?.. The PO print should diplay the whatever the value available in PO.

Former Member
0 Kudos

I want to clear more things like:---

showing like this:-------

Gross Price..................................13.60 USD............1 Nos.........1400.80

Discount % on Gross.....................4%(-).....................................56.03(-)

Net incl. disc.................................13.06 USD............1 Nos.........1344.77

Please look at BOLD line, here 1344.77 amount is calculated based on 13.056 USD, not at 13.06. But in PO it is showing 13.06 USD. (round off)

I want amount 1345.18 instead of 1344.77, because when we calculated on 13.06, amount should be 1345.18.

Plz help...

alex_m
Active Contributor
0 Kudos

Did you using the std SAP driver program or custom one, if its a custom you can do the calculation in driver program or else you need chabge it in Script.