‎2011 Aug 26 10:40 AM
Hi Experts,
I have a report program A and B. I am trying to call report program B from my report progam A using the SUBMIT functionality.
While calling the program B, i am using the below code:
submit B VIA SELECTION-SCREEN
with P_DAYS = '4'
with P_KALSM = 'ZATCIN'
with S_VBELN-LOW = w_inv. "w_inv will be having some document number
Issue here is, in the report program B, at the initialisation stage they have hardcoded value for S_VBELN-LOW.
INITIALIZATION.
S_VBELN-LOW = '990090914'.
APPEND S_VBELN.
So, when i exeucte the main program A, the B program is called with selection screen but the S_VBELN is overwritten with the hardocded value '990090914'. W_inv is not assigned to the field VBELN in the selection scree.
Can you please help why this is happening and please suggest a solution to over come this.
Thanks and Regards,
Deepa
‎2011 Aug 26 10:44 AM
Hi,
In this case you need to use another internal table which is of type S_VBELN . Ex : it_vbeln.
In that you have to append the record
wa_vbeln-sign = 'I'
wa_vbeln-option = 'EQ'
wa_vbeln-low = w_inv.
append wa_vbeln to it_vbeln.
now use this
submit B VIA SELECTION-SCREEN
with P_DAYS = '4'
with P_KALSM = 'ZATCIN'
with S_VBELN = it_vbeln.
Now the new record will be appended with the values which are passing,. SO u wil have two rows in the S_VBELN.
Regards,
Venkatesh.
‎2011 Aug 26 10:44 AM
Hi,
In this case you need to use another internal table which is of type S_VBELN . Ex : it_vbeln.
In that you have to append the record
wa_vbeln-sign = 'I'
wa_vbeln-option = 'EQ'
wa_vbeln-low = w_inv.
append wa_vbeln to it_vbeln.
now use this
submit B VIA SELECTION-SCREEN
with P_DAYS = '4'
with P_KALSM = 'ZATCIN'
with S_VBELN = it_vbeln.
Now the new record will be appended with the values which are passing,. SO u wil have two rows in the S_VBELN.
Regards,
Venkatesh.
‎2011 Aug 26 11:55 AM