on 07-11-2008 8:24 PM
Hello Everybody,
I am modifying sap script to change the date format and amount which is desplayed on the output.
Here's the code i ahve done so far.
DEFINE &LS_ZALDT& = '0 0 0 0 0 0 0 0'
DEFINE &LS_REGUH_ZALDT& = ®UH-ZALDT&
DEFINE &LS_SWNES& = ' '
PERFORM CHECK_DATE_FORMAT IN PROGRAM ZFI_RFFOUS_C
USING ®UH-ZALDT&
USING ®UD-SWNES&
CHANGING &LS_ZALDT&
CHANGING &LS_SWNES&
ENDPERFORM
and form is
FORM check_date_format using value(is_zaldt)
value(is_swnes)
CHANGING value(cs_zaldt)
value(cs_swnes).
If I do above is_zaldt and cs_zaldt are in table format. How do I read the cs_zaldt. Is there other way to do this?
Thanks in Advance
Prasad
Hi,
It will be of the structure, ITCSY.
For eg:
PERFORM F001_PLANT_NAME IN PROGRAM ZMNO_PUR_ORD
USING &EKKO-EBELN&
USING &EKKO-BUKRS&
USING &EKPO-EBELP&
CHANGING &F_NAME1&
CHANGING &F_BUTXT&
ENDPERFORM
FORM f001_plant_name TABLES i_itab STRUCTURE itcsy
i_otab STRUCTURE itcsy.
Read value of Purchasing document no.
READ TABLE I_ITAB WITH KEY 'EKKO-EBELN'. "->D10K903921
READ TABLE i_itab WITH KEY
name ='EKKO-EBELN'. "<-D10K903921
CHECK sy-subrc EQ 0.
MOVE i_itab-value TO f_ebeln.
Get plant name. The plant name is on the detail lines, this value
is require once so the select single is used for speed issues.
SELECT SINGLE werks
INTO f_werks
FROM ekpo
WHERE ebeln = f_ebeln.
SELECT SINGLE name1
INTO f_name1
FROM t001w
WHERE werks = f_werks.
Manually you need send proper data in the output table.
Append plant name
MOVE 'F_NAME1' TO i_otab-name.
MOVE f_name1 TO i_otab-value.
APPEND i_otab.
Append Company code text
MOVE 'F_BUTXT' TO i_otab-name.
MOVE f_butxt TO i_otab-value.
Regards,
Subramanian
APPEND i_otab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Do it like this...
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY u2018BARCODEu2019.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = u2018|u2019. "First page
ELSE.
OUT_PAR-VALUE = u2018||u2019. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Bye!
Gabriel P-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.