2009 Feb 18 2:59 AM
hi to all experts ,
im writing a macro to populate the field catalogue
but facing this problem
DEFINE m_fieldcat.
add 1 to wa_fcat-col_pos.
wa_fcat-checkbox.
wa_fcat-fieldname.
wa_fcat-seltext_m.
wa_fcat-edit.
wa_fcat-reftabname.
append wa_fcat to it_fcat.
CLEAR wa_fcat.but when passing 'X' to checkbox.
m_fieldcat : 'X' 'CHECKBOX''SELECTION' 'X' ' ' .im getting an error message that unable to intrepret "X" comma or spelling error .
help me out of this
2009 Feb 18 3:02 AM
Khan,
Do it this way
DEFINE m_fieldcat.
itfieldcat-fieldname = &1.
itfieldcat-col_pos = &2.
itfieldcat-seltext_l = &3.
itfieldcat-emphasize = &4.
itfieldcat-outputlen = &5.
append itfieldcat to itfieldcat.
clear itfieldcat.
END-OF-DEFINITION.
m_fieldcat 'AENNR' '' 'Change Number' '' 12.
m_fieldcat 'REVLV' '' 'Revision Level' '' 02.
m_fieldcat 'TEXT1' '' 'Description' '' 250.
K.Kiran.
hi to all experts ,
im writing a macro to populate the field catalogue
but facing this problem
DEFINE m_fieldcat.
add 1 to wa_fcat-col_pos.
wa_fcat-checkbox.
wa_fcat-fieldname.
wa_fcat-seltext_m.
wa_fcat-edit.
wa_fcat-reftabname.
append wa_fcat to it_fcat.
CLEAR wa_fcat.but when passing 'X' to checkbox.
m_fieldcat : 'X' 'CHECKBOX''SELECTION' 'X' ' ' .im getting an error message that unable to intrepret "X" comma or spelling error .
help me out of this
2009 Feb 18 3:02 AM
Khan,
Do it this way
DEFINE m_fieldcat.
itfieldcat-fieldname = &1.
itfieldcat-col_pos = &2.
itfieldcat-seltext_l = &3.
itfieldcat-emphasize = &4.
itfieldcat-outputlen = &5.
append itfieldcat to itfieldcat.
clear itfieldcat.
END-OF-DEFINITION.
m_fieldcat 'AENNR' '' 'Change Number' '' 12.
m_fieldcat 'REVLV' '' 'Revision Level' '' 02.
m_fieldcat 'TEXT1' '' 'Description' '' 250.
K.Kiran.
2009 Feb 18 3:03 AM
2009 Feb 18 3:08 AM
Hi,
obviously you don't know how to use macro. Why don't you start with reading documentation for ABAP statement DEFINE? It has a nice example of simple macro with good explanation. You should try to understand solution for your problem, not just copy and paste solution from different sources such as this forum.
Good luck
2009 Feb 18 3:10 AM