07-05-2011 6:05 PM
Hi All,
I appreciate your help on the below please;
I need to check the Sales order is having attachments or not;
Appreciate if you know the SAP table field for the above check please;
Thanks
Iver
07-05-2011 7:29 PM
Hi,
Try out this.
DATA: is_object TYPE sibflporb,
it_relation_options TYPE obl_t_relt,
is_relation_options TYPE obl_s_rolt,
gt_links TYPE obl_t_link.
is_object-instid = <sales order number with leading zeros>.
is_object-typeid = 'BUS2032'.
is_object-catid = 'BO'.
*u201Ddocument relation
is_relation_options-sign = 'I'.
is_relation_options-option = 'EQ'.
is_relation_options-low = 'ATTA'.
APPEND is_relation_options TO it_relation_options.
TRY.
CALL METHOD cl_binary_relation=>read_links
EXPORTING
is_object = is_object
it_relation_options = it_relation_options
IMPORTING
et_links = gt_links.
ENDTRY.
GT_LINKS should be filled if sales order has attachment.
Regards,
Sudhakar