Hello Experts,
To receive a value and a structure in my main program (z_craete_order_doc) from another program (z_craete_order_doc_batch) I'm using SUBMIT command as follows.
submit z_craete_order_doc_batch
user sy-uname
via job lv_jname
number lv_jcount
with selection-table i_seltab
and return.
This is to create a sales order and update it with some custom details. Within z_craete_order_doc_batch program I've two EXPORT statements as follows.
export v_new_order value from 'Literal' to memory id 'Z_CRAETE_ORDER_DOC_ORDER'.
export return value from 'Literal' to memory id 'Z_CRAETE_ORDER_DOC_ERROR'.
In my main program (z_craete_order_doc) which calls this (z_craete_order_doc_batch) program I've the following import statements.
import v_new_order to gv_new_order from memory id 'Z_CRAETE_ORDER_DOC_ORDER'.
import return to g_return from memory id 'Z_CRAETE_ORDER_DOC_ERROR'.
The issue is that none of the above imports are getting value. Even though orders are getting created which I can check manually because in
z_craete_order_doc_batch I creates a JOB to be open if order has created. Also I check in VBAK table newly created order. So orders are getting created and even if they're not then return should have error values, which is also always blank.
Can anybody see what mistake I'm making and suggest how to rectify it?
Many thanks in advance.