2006 Oct 03 9:04 PM
Hi All,
While calling a routine from SO10, both input table and output table are empty, I have used in following way..
/: DEFINE &PER& = &PTXT1-PERNR&
/: PERFORM ADDRESS IN PROGRAM ZHR_OFFER
/: USING PER
/: CHANGING &P0001-PERNR&
/: CHANGING &STRAS&
/: ENDPERFORM
In routine (ABAP)
FORM ADDRESS tables in_tab structure itcsy out_tab structure itcsy.
Data: v_name2 like p0006-name2, " C/O
v_stras like p0006-stras. " Street/House no
read table in_tab index 1.
if sy-subrc = 0.
...
...
EndForm.
Here both in_tab and out_tab are empty while debugging i found that (in std program, which is calling routine)
perform (co_perform-form) in program (co_perform-program)
tables co_sym_using
co_set_symbols
Here co_perform-form is filled with ADDRESS and
co_perform-program is filled with ZHR_OFFER, but
co_sym_using, co_set_symbols tables are empty.
Since these tables are empty, values are not getting passed from SO10 to ABAP, Your input on this please.
Thanks,
2006 Oct 03 11:54 PM
Is the program ZHR_OFFER a report program or a subroutine pool..
If it is a subroutine pool try creating a report and add your subroutine..And then try printing the form..
As in the sap help examples..He has given report program as the abap program..
http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
Thanks,
Naren
Is the program ZHR_OFFER a report program or a subroutine pool..
If it is a subroutine pool try creating a report and add your subroutine..And then try printing the form..
As in the sap help examples..He has given report program as the abap program..
http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
Thanks,
Naren
2006 Oct 03 9:57 PM
Hi,
Try passing &PER& instead of PER..
: DEFINE &PER& = &PTXT1-PERNR&
/: PERFORM ADDRESS IN PROGRAM ZHR_OFFER
/: USING <b>&PER&</b>
/: CHANGING &P0001-PERNR&
/: CHANGING &STRAS&
/: ENDPERFORM
Thanks,
Naren
2006 Oct 03 10:26 PM
Hi Naren,
I tried by giving <b>&PER&</b> as well, even this is also not working out, is there is anywhere i am going wrong ?, your suggestions on the same please.
Thanks,
2006 Oct 03 10:41 PM
Hi,
Write the perform in a sapscript form instead of in the standard text..Check this..I am not sure if this could be a problem..
Thanks,
Naren
2006 Oct 03 11:27 PM
Hi Naren,
Actually my requirement is to make it from standard text, because in HR some <b>features</b> are being used, these feature is referring to the standard text only. Can my requirement be accomplished through standard text.
Thanks,
2006 Oct 03 11:54 PM
Is the program ZHR_OFFER a report program or a subroutine pool..
If it is a subroutine pool try creating a report and add your subroutine..And then try printing the form..
As in the sap help examples..He has given report program as the abap program..
http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
Thanks,
Naren
2006 Oct 04 6:38 AM
Hi,
Naren: I am using Report program only, its not subrouting pool
Dharitree: In standard text &PTXT1-PERNR& is getting populated, as per my understanding I dont think this will be the problem, because at runtime the structure PTXT1 is getting populated.
Whether my requirement is possible in standard text ?
Thanks for your time..
2006 Oct 04 7:45 AM
Hi Gar,
Amit is right.
Write:
PERFORM ADDRESS IN PROGRAM ZHR_OFFER
/: USING &PTXT1-PERNR&
/: CHANGING &P0001-PERNR&
/: CHANGING &STRAS&
/: ENDPERFORM
Don't define any variable in Text.
Regards,
Dharitree
2006 Oct 04 5:42 AM
Hi Gam,
According to me, it won't work in Standard text because your variable "PTXT1-PERNR" is in script. So you will not get value in Satndard text that's why you input_tab is empty.
You will have to write a code in script only.
Regards,
Dharitree
2006 Oct 04 6:45 AM
Hi gar,
1. why are u using another variable &PER&
2. &P0001-PERNR is already available.
3. Don't pass any variable which is defined
in so10 using DEFINE.
4. Only use variables defined in the driver program.
5.
PERFORM ADDRESS IN PROGRAM ZHR_OFFER
/: USING &P0001-PERNR&
/: CHANGING &P0001-PERNR&
/: CHANGING &STRAS&
/: ENDPERFORM
regards,
amit m.
2006 Oct 04 7:53 AM
Hi,
Try this out ....
In Routine:-
<b>/: PERFORM ADDRESS IN PROGRAM ZHR_OFFER
/: USING &PTXT1-PERNR&
/: CHANGING &P0001-PERNR&
/: CHANGING &STRAS&
/: ENDPERFORM</b>In ABAP Program:-
FORM ADDRESS tables in_tab structure itcsy out_tab structure itcsy.
Data: v_name2 like p0006-name2, " C/O
v_stras like p0006-stras. " Street/House no
read table in_tab index 1.
if sy-subrc = 0.
pass the values to the fields
Endif.
read table out_tab index 1.
out-tab-value = 'pass the value'.
<b>MODIFY OUT_PAR INDEX SY-TABIX.</b>
EndForm.
Regards
Sudheer
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |