2020 May 14 7:54 AM
I have an requirement to add field ' Lot no.' in smartforms.
for which i need take values from Transaction 'ZSDAH29' .
Is it possible? How to use call transaction in sap?
Can some one help with an example..
It is an urgent requirement!!.
Thanks in advance
I have an requirement to add field ' Lot no.' in smartforms.
for which i need take values from Transaction 'ZSDAH29' .
Is it possible? How to use call transaction in sap?
Can some one help with an example..
It is an urgent requirement!!.
Thanks in advance
2020 May 14 7:58 AM
Hi deepa22_
Sure, you can executed ABAP code in the Smartforms form, or better yet, call logic contained in some "external" (not contained in Smartform) class or program.
As to your requirement I see two solutions:
regards,
Mateusz
2020 May 14 8:51 AM
Hi,
we tried that way writing similar logic in our smartforms... But there is prbm, only fews only will come in ZSDAH29 transaction with some barcoded thing, when we write the logic it will apply to all the materials which does not comes into ZSDAH29, so that only customer is asking to use the values from that transaction.
can u please share an example using the call transaction, or can u share any links for me to understand how to use the call transaction in another program..
2020 May 14 9:05 AM
Hi deepa22_
Maybe there is a possibility to move part of the report's logic to a function and then call the same function from the report and smartform? That would be a good solution, too.
If not, if you really have to execute the transaction and parse the output, then what you're looking for is a SUBMIT keyword.
There you must provide:
After this call you have to use function LIST_FROM_MEMORY to read the exported results from memory into an internal table of type ABAPLIST. Having that you're able to parse the results.
However, I strongly advise on using some other solution (calling a procedure /FORM/ from the report or moving part/whole logic to a function) than parsing the results.
regards,
Mateusz
2020 May 19 3:55 PM
Hi Mateusz,
I tried using submit and return method in my smartforms .. Values are fetching properly..
But facing an problem.. i am getting the output screen of calling program, so that smartforms is not getting printed directly, everytime i am pressing back screen to get the invoice document..?
Kindly help...
Thanks,
Deepa.
2020 May 19 4:01 PM
Hi Deepa
I see two possibilities here:
1. In Smartforms, call a procedure from the report, using PERFORM 'procedure_name' IN PROGRAM 'program_name' and this way get the results. This will work only if the logic of the report is contained in a procedure, of course.
2. Change the report, add selection screen parameter which when checked will make the report to not show any screens.
As mentioned before, moving the report's logic to a separate function is the best option here.
Regards,
Mateusz2020 May 20 11:28 AM
Hi Mateusz,
1.Changing of selection screen parameters is not possible because that is separate program so..
2.if am using "PERFORM 'procedure_name' IN PROGRAM 'program_name' " , how i will pass the values to fetch data..?
for example..
i need to pass the material number '000000000018003000' from Smartform to calling program as an input ..
how come i will pass these values..
can u please explain with example in passing the value..
thanks in advance 🙂
2020 May 20 11:32 AM
Hi Deepa,
If you're calling a procedure using the PERFORM IN PROGRAM then you can pass to the procedure only what procedure's parameters allow. Nothing else. If the procedure has no parameters but uses global variables, then you either have to call the main report or some other procedure/function that sets the global variables.
Regards,2020 May 14 8:37 AM
Hi deepa22_
As Mateusz Adamus said coping the logic of z* program to smartform is best way of addressing the requirement.
If it's to be called then it's better write it in DP..
Regards
Abinath S
2020 May 14 8:52 AM
Hi Abi,
when they want from the ztransaction to avoid some other consequences..
Thanks,
Deepa
2020 May 14 11:57 AM
Sorry but we can't help, ZSDAH29 is custom, you are the only one to know what it is about.
Please don't pollute with tags which are not related to your question: ABAP RESTful Programming Model | ABAP Connectivity | ABAP Extensibility | NW ABAP Gateway (OData)
2020 May 14 11:57 AM
2020 May 19 3:51 PM
Is there any other possible way to move the first program data into second program...?
But the parameters or select options gets value from second program..
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |