‎2010 Oct 22 12:13 PM
Hi All,
I have a BDC program which creates a session in SM35.In Bdc program we have used the tcode F-04.
I have an requirement that when I pass an FI Document to F-04 it ll display all line items under that document and if same document number present for other year which are not cleared are also get displayed.So i have to restrict it to current year and enhancement for same is done.But this functionality should carry out only if transaction is called by Z program.
So, can anyone help me with giving logic to find the Z program name from which session is created while processing it.
Thanks&Regards,
Sneha Kumari
‎2010 Oct 22 4:25 PM
Why don't you mark a document header field or a document text from the Z-program and read the value in the enhancement?
‎2010 Oct 22 4:46 PM
Try SY-BATCH field check in your F-04 enhancement. If SY-BATCH field is not initial that means F-04 is running in background session assuming being called from your custom BDC program.
regards,
Pranav
‎2010 Oct 22 4:57 PM
Try SY-BATCH field check in your F-04 enhancement. If SY-BATCH field is not initial that means F-04 is running in background session assuming being called from your custom BDC program.
That's a bad assumption - and what happens if the user runs the session in foreground? SY-BINPT is much better but still not a good idea...