‎2009 Mar 16 8:14 AM
Hi,
In function module /DSD/ME_GL_MATERIAL there is a select been used
SELECT * INTO TABLE ldt_material_hd FROM /dsd/me_mat_hd
UP TO i_max_reccnt ROWS
WHERE mat_type IN so_mat_type
AND (ldt_wa).
The value for ldt_wa been populate by
IF ldf_sel IS INITIAL.
CONCATENATE 'updflg = ' space '''' 'X' ''''
INTO lds_wa.
ldt_wa = lds_wa.
APPEND ldt_wa.
ELSE.
ldt_wa = ldf_sel.
APPEND ldt_wa.
ENDIF.
So the content of ldt_wa is coming as updflg = 'X'.
In the query if it coming as 'X' the select query is not picking data from the table. Can you please explain what is this field is doing in this select query.
Expecting the solution .
Ambrose
‎2009 Mar 16 8:21 AM
HI,
Try this way..
DATA: G_X type C Value 'X'.
IF ldf_sel IS INITIAL.
CONCATENATE 'mat_type IN so_mat_type AND updflg = ' g_x
INTO lds_wa SEPRATED BY SPACE.
ldt_wa = lds_wa.
APPEND ldt_wa.
ELSE.
ldt_wa = 'mat_type IN so_mat_type'.
APPEND ldt_wa.
ENDIF.
SELECT * INTO TABLE ldt_material_hd FROM /dsd/me_mat_hd
UP TO i_max_reccnt ROWS
WHERE (ldt_wa).
‎2009 Mar 16 8:21 AM
HI,
Try this way..
DATA: G_X type C Value 'X'.
IF ldf_sel IS INITIAL.
CONCATENATE 'mat_type IN so_mat_type AND updflg = ' g_x
INTO lds_wa SEPRATED BY SPACE.
ldt_wa = lds_wa.
APPEND ldt_wa.
ELSE.
ldt_wa = 'mat_type IN so_mat_type'.
APPEND ldt_wa.
ENDIF.
SELECT * INTO TABLE ldt_material_hd FROM /dsd/me_mat_hd
UP TO i_max_reccnt ROWS
WHERE (ldt_wa).
‎2009 Mar 16 8:25 AM
Dear Avinash,
Thanks for your reply.But i need what this (ldt_wa) is doing the query .
Ambrose
Edited by: ambrose mohandoss on Mar 16, 2009 9:28 AM
‎2009 Mar 16 8:36 AM
‎2009 Mar 16 8:25 AM
May be there's no records with that condition
WHERE mat_type IN so_mat_type
AND updflg = 'X'.Pl. check the data.
‎2009 Mar 16 8:28 AM
‎2009 Mar 16 8:47 AM
Hi,
The FM first tries to check if there is a user exit for material handling.
If yes,
It tries to retrieve a dynamic where clause to restrict selection
end if.
if no clause was retrieved.
lds_wa = updflg = 'X'.
endif.