05-31-2011 7:05 PM
Hi All,
I have a alv grid report using fm reuse_alv_grid_dispaly. My requirement is to create sales order using bapi (up to here it is working fine) and once the SO is created update the function module tables field with the created sales order.
Example:
My alv grid display before creating SO:
Customer Material SalesOrder
1000001 material1
My alv grid display after creating SO:
Customer Material SalesOrder
1000001 material1 3025642
How can I achieve this functionality. Because the field catalog is already displayed, how can I modify/update it by adding the sales order number to it. Experts, suggest me.
Thanks.
05-31-2011 7:22 PM
You asked exactly the same question in . You said it was solved and marked it as solved. Why are you asking again?
Rob
05-31-2011 7:32 PM
In the previous thread, I totally refreshed the entire row of internal table once the sales order is created without adding any new field to the field catalog. Now I need to update/modify the display by adding a new field to my field catalog. That's where I am messed up with. Please suggest me if you have any ideas.
05-31-2011 8:44 PM
Initial display , set the Sales order field in the field catalog as No out or Tech field, later once order is created, Use the FM REUSE_ALV_GRID_LAYOUT_INFO_GET & REUSE_ALV_GRID_LAYOUT_INFO_SET. Make sure to takeout the No out for the sales order field in fieldcatalog before passing to SET method.
06-01-2011 3:33 PM
Hi Suman,
Thanks for the response. By chance, do you have any sample code snippet which does the same thing what you have told.
06-01-2011 4:00 PM
FORM callback_ucomm USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN 'CRE'.
* Logic to create sales order here...
* Show the Sales order column
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
IMPORTING
et_fieldcat = gt_fieldcat
EXCEPTIONS
no_infos = 1
program_error = 2
OTHERS = 3.
if sy-subrc eq 0.
read table gt_fieldcat into gs_fieldcat with key fieldname = 'VBELN'.
if sy-subrc eq 0.
gs_fieldcat-no_out = space.
gs_fieldcat-tech = space.
modify gt_fieldcat from gs_fieldcat index sy-tabix transporting no_out tech.
endif.
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_SET'
EXPORTING
it_fieldcat = gt_fieldcat[].
endif.
ENDFORM.
06-14-2011 3:30 AM
Hi Suman,
Thanks for the reply. My problem is solved.
Thanks Again.