‎2013 Dec 17 5:28 AM
Hi All, I have created one BADI for add some fields in LFB1.I have append structure in LFB1 related with required customized fields. Now i need to call this structure in PAI in User_command _input,to export the in BADI class. But while declare structure its showing error. MODULE USER_COMMAND_9000 INPUT. Loop at screen. endloop. TYPES: Begin of zall_sf_bee, ZBEE TYPE INT1, ZEXPDT TYPE DATS, ZBEETYP TYPE ZZBEETYP, ZBLACK TYPE ZZBLACK, ZBFEM TYPE ZZBFEM, ZVADD TYPE ZZVADD, ZBFEMO TYPE ZZBFEMO, ZENTBEN TYPE ZZENTBEN, END OF ZALL_SF_BEE. Move LFB1-zall_sf_bee to w_zall_sf_bee. EXPORT w_zall_sf_bee FROM w_zall_sf_bee TO MEMORY ID 'w_zall_sf_bee'. ENDMODULE. zall_sf_bee its a append structure in LFb1 table. showing error zall_sf_bee does not have component of LFB1. Please let me know where I am doing wrong . Thanks and REgards Sankil
‎2013 Dec 17 6:03 AM
Hii Sankil,
If the two structure are of not same line type i.e order of fields , number of fields and type of fields then we can't use the move x TO y.
This will only possible if the X and Y are same with each other.
So in your case you can use MOVE-CORRESPONDING LFB1 TO w_zall_sf_bee. OR
Assign the particular field of one work area to the particular field of another work area e.g
w_zall_sf_bee-ZBEE = lfb1-zbee.
w_zall_sf_bee-ZBEETYP = lfb1-ZBEETYP.
w_zall_sf_bee-ZENTBEN = lfb1-ZENTBEN.
APPEND w_zall_sf_bee TO t_zall_sf_bee. "t_zall_sf_bee internal table of type zall_sf_bee.
CLEAR w_zall_sf_bee.
regards
Syed
‎2013 Dec 17 5:31 AM
You can not use this Move LFB1-zall_sf_bee to w_zall_sf_bee..
Refer individual fields or move corresponding lfb1 to w_zall_sf_bee..
w_zall_sf_bee-zbee = lfb1-zbee .
‎2013 Dec 17 5:39 AM
hi,
this line makes error. Move LFB1-zall_sf_bee to w_zall_sf_bee
better you try like this. move lfb1 to w_zall_sf_bee.
Regards,
gopi
‎2013 Dec 17 6:03 AM
Hii Sankil,
If the two structure are of not same line type i.e order of fields , number of fields and type of fields then we can't use the move x TO y.
This will only possible if the X and Y are same with each other.
So in your case you can use MOVE-CORRESPONDING LFB1 TO w_zall_sf_bee. OR
Assign the particular field of one work area to the particular field of another work area e.g
w_zall_sf_bee-ZBEE = lfb1-zbee.
w_zall_sf_bee-ZBEETYP = lfb1-ZBEETYP.
w_zall_sf_bee-ZENTBEN = lfb1-ZENTBEN.
APPEND w_zall_sf_bee TO t_zall_sf_bee. "t_zall_sf_bee internal table of type zall_sf_bee.
CLEAR w_zall_sf_bee.
regards
Syed