I've got a problem with getting the Sales Order pricing conditions during a print (+preview)
of a sales order, this via a function module within my smartform: BS01_SALESORDER_GETDETAIL.
When I perform a print preview (generate a smartform) for my sales order the function below
is executed within our customizing definded smartform for Order Confirmation.
(actual problem description)
The thing is that when I'm outside the sales order (transaction VA03) and
I perform a "Issue Output to" the function below works perfect and both my
needed tables (lt_order_condidtions & lt_order_cond_item) are filled in
correctly with data from the sales order.
Once I'm in the sales order itself the preview of my smartform does execute
this function below except my tables are empty.
I allready tried & defined every table for the function and filled them in + tested my smartform again. That
is how I noticed that some tables are correctly filled in while my needed tables are
not. This also explains why the lt_return table is initial and so leaving me no clue
why this is happening.
Can it be that when I'm inside a sales order it locks certain data preventing this
function to fetch data for itself?
Are there alternatives for this?
Somebody any idea why this is happening?
If you need additional information do not hesitate to ask me.
Helpfull answers will be rewarded!
Thanks for your help.
Get Sales Order pricing conditions to determine unit values
CALL FUNCTION 'BS01_SALESORDER_GETDETAIL'
salesdocument = zvbdka-vbeln
internal_use = ' '
order_header = lt_order_header
return = lt_return
order_conditions = lt_order_conditions
order_cond_item = lt_order_cond_item
IF lt_return IS INITIAL.