‎2006 Nov 02 11:13 AM
hi to all,
help me in this issue
below is select and rfc used
i need to consider one more ztable to pass the data here it is considerd only one table zsd i also need to consider zsd1 table also and pass the same
SELECT SINGLE * FROM Zsd
WHERE ZST = P_ST.
CALL FUNCTION 'ZUPD'
EXPORTING
FROM_DAT = FROM_DT
TO_DAT = TO_DT
STATUS = 'F'
STAT = P_ST
date = Zsd-date
TABLES
GR_STAT_UPD = ITUD.
thanks in advance
kiran kumar.
Message was edited by: kiran kumar
‎2006 Nov 02 11:32 AM
hi,
The below is a wonderfull piece of coding were we can dynamically access the table using inner join and without mentioning the field names !!!
PARAMETERS: P_MATNR TYPE MATNR.
DATA: BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE MARA.
DATA: WERKS LIKE MARC-WERKS,
END OF ITAB.
DATA: BEGIN OF DY_FIELDS OCCURS 0,
FIELD(61),
END OF DY_FIELDS.
DATA: FIELDS LIKE DFIES OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'DDIF_NAMETAB_GET'
EXPORTING
tabname = 'MARA'
TABLES
DFIES_TAB = FIELDS
EXCEPTIONS
NOT_FOUND = 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.
LOOP AT FIELDS.
CLEAR: DY_FIELDS.
CONCATENATE 'A~' FIELDS-FIELDNAME INTO DY_FIELDS-FIELD.
APPEND DY_FIELDS.
ENDLOOP.
DY_FIELDS = 'B~WERKS'.
APPEND DY_FIELDS.
SELECT (DY_FIELDS)
INTO TABLE ITAB
FROM MARA AS A INNER JOIN MARC AS B
ON AMATNR = BMATNR
WHERE A~MATNR = P_MATNR.
CHECK SY-SUBRC = 0.
rgds
anver
‎2006 Nov 02 11:18 AM
Hi,
use JOIN of zsd and zsd1 and put the data to a ITAB.
use that itab in RFC.
rgds
anver
‎2006 Nov 02 11:20 AM
hi anversha,
there r many feilds in two tables how can i use join statemnt.
thanks in advacne
kiran kumar
‎2006 Nov 02 11:32 AM
hi,
The below is a wonderfull piece of coding were we can dynamically access the table using inner join and without mentioning the field names !!!
PARAMETERS: P_MATNR TYPE MATNR.
DATA: BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE MARA.
DATA: WERKS LIKE MARC-WERKS,
END OF ITAB.
DATA: BEGIN OF DY_FIELDS OCCURS 0,
FIELD(61),
END OF DY_FIELDS.
DATA: FIELDS LIKE DFIES OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'DDIF_NAMETAB_GET'
EXPORTING
tabname = 'MARA'
TABLES
DFIES_TAB = FIELDS
EXCEPTIONS
NOT_FOUND = 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.
LOOP AT FIELDS.
CLEAR: DY_FIELDS.
CONCATENATE 'A~' FIELDS-FIELDNAME INTO DY_FIELDS-FIELD.
APPEND DY_FIELDS.
ENDLOOP.
DY_FIELDS = 'B~WERKS'.
APPEND DY_FIELDS.
SELECT (DY_FIELDS)
INTO TABLE ITAB
FROM MARA AS A INNER JOIN MARC AS B
ON AMATNR = BMATNR
WHERE A~MATNR = P_MATNR.
CHECK SY-SUBRC = 0.
rgds
anver