06-13-2011 3:55 PM
Hi Friends,
I have a ALV grid report (REUSE_ALV_GRID_DISPLAY) which creates Sales Order thru bapi (BAPI_SALESORDER_CREATEFROMDAT2). Initially my requirement is to create one SO at a time for customer-material combinations. If the sales order is created sucessfully I gave a status message saying that " SO 123 created sucessfully for customer ABC". Till here it is working fine.
My requirement changed in such a way that - Lets say I have 8 different customers with different materials. I need to create the sales order for the selected customers. For that I created a checkbox coloum in my report and if user selects what ever customers she needs, it will create a sales order for that customers only. If she selects 3 different customers out of 8, three sales orders will be created.(It is working fine till here too).
My question is, let's say among the 3 different customers selected 2 sales order got created sucessfully and 1 has some error. I need to show the sucess or failure messages in a pop-up ALV which I should be able to save the information from pop-up to presentation server.
My thoughts were - Get the success and error messages into a table and display that table thru some pop-up ALV FM.
But , how do I need to loop thru the sucess and failure messages and Is there any FM for pop-up ALV display? Sugest me if I am wrong here.
Example:
1. Sales document 123 created sucessfully for customer ABC.
2. Sales document not created sucessfully for customer EFG.
3. Sales document 901 created sucessfully for customer IJK.
Please guide me/help me hoe to achieve this. Sample code snippet is appreciable.
Thanks.
06-13-2011 4:20 PM
06-13-2011 5:19 PM
06-13-2011 5:27 PM
Yes - I missed that.
@nani - please close one of these threads and assign some points to those that helped.
Rob
06-13-2011 6:48 PM
Hi Suman and Rob,
Yes. I have created a thread for the same last week. But when I tried to open my thread, I see a message saying that "this thread is no longer in use". So, I posted a new one.
Please see my code below.
TYPES:
BEGIN OF GTY_LOGS_USAGE,
MESSAGE1(100),
MESSAGE2(100),
MESSAGE3(100),
END OF GTY_LOGS_USAGE.
DATA:
IT_LOGS_USAGE TYPE STANDARD TABLE OF GTY_LOGS_USAGE,
WA_LOGS_USAGE TYPE GTY_LOGS_USAGE.
DATA:
L_TABNAME TYPE SLIS_TABNAME,
I_STRUCTURE_NAME LIKE DD02L-TABNAME,
SELECTION TYPE SLIS_SELFIELD,
IT_LOGS TYPE SLIS_T_FIELDCAT_ALV, "internal table for field catalog
WA_LOGS TYPE SLIS_FIELDCAT_ALV, "work area for field catalog
EXIT_FLAG.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'Logs for sucess and error messages'
I_SELECTION = 'X'
* I_ALLOW_NO_SELECTION =
* I_ZEBRA = ' '
* I_SCREEN_START_COLUMN = 1
* I_SCREEN_START_LINE = 1
* I_SCREEN_END_COLUMN = 1
* I_SCREEN_END_LINE = 1
* I_CHECKBOX_FIELDNAME =
* I_LINEMARK_FIELDNAME = 'COLOUR'
I_SCROLL_TO_SEL_LINE = 'X'
I_TABNAME = 'IT_LOGS_USAGE'
I_STRUCTURE_NAME = 'IT_LOGS_USAGE'
IT_FIELDCAT = IT_LOGS[]
* IT_EXCLUDING =
I_CALLBACK_PROGRAM = GD_REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
* IS_PRIVATE =
* IMPORTING
* ES_SELFIELD = SELECTION
* E_EXIT = EXIT_FLAG
TABLES
T_OUTTAB = IT_LOGS_USAGE
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2.
There is a value in my IT_LOGS_USAGE. When I click the custom push button for the logs to display, I see a pop-up but, I don't see any value in my pop-up. Am I doing anything wrong?
Please suggest.
06-13-2011 7:07 PM
Hi Suman and Rob,
Yes. I have created a thread for the same last week. But when I tried to open my thread, I see a message saying that "this thread is no longer in use". So, I posted a new one.
I have never heardd of or seen such a message. Anyway, I marked it as assumed answered. You can still go back and assign polnts.
Please do.
Rob
06-13-2011 7:16 PM
Hi Rob,
I have pasted my code above. Get a chance, I would really appreciate if you could suggest me if I have done anything wrong.
Thanks.
06-13-2011 7:26 PM
Well, as Suman Jagu pointed out, this won't allow you to do a download.
Rob
06-13-2011 7:33 PM