2006 Nov 10 6:29 AM
Anyone know what the below code mean?
CONSTANTS: C_IT(20) TYPE C VALUE '(SAPLEBNE)BSN[]',
C_FIELD(20) TYPE C VALUE 'KUNNR'.
FIELD-SYMBOLS: <KUNNR> TYPE EBAN-KUNNR,
<IT> TYPE ANY TABLE,
<WA> TYPE ANY.
ASSIGN (C_IT) TO <IT>.
LOOP AT <IT> ASSIGNING <WA>.
ASSIGN COMPONENT C_FIELD OF STRUCTURE <WA> TO <KUNNR>.
CHECK SY-SUBRC = 0.
<KUNNR> = VBAK-KUNNR.
ENDLOOP.
2006 Nov 10 6:38 AM
Hi Justin
This is a way of indirectly reference to variables, work areas, internal tables of a different program.
Suppose we implementing a user-exit for a particular transaction. We might not have all the required variables used in the actual program, we can internally follow the above method to access the data declared in the original program.
Here SAPLEBNE is the program and BSN is the internal table the code is trying to access.
Internal table BSN can be found in include: LEBNETOP of program SAPLEBNE.
Program is related to Purchase Requistions.
Kind Regards
Eswar
Anyone know what the below code mean?
CONSTANTS: C_IT(20) TYPE C VALUE '(SAPLEBNE)BSN[]',
C_FIELD(20) TYPE C VALUE 'KUNNR'.
FIELD-SYMBOLS: <KUNNR> TYPE EBAN-KUNNR,
<IT> TYPE ANY TABLE,
<WA> TYPE ANY.
ASSIGN (C_IT) TO <IT>.
LOOP AT <IT> ASSIGNING <WA>.
ASSIGN COMPONENT C_FIELD OF STRUCTURE <WA> TO <KUNNR>.
CHECK SY-SUBRC = 0.
<KUNNR> = VBAK-KUNNR.
ENDLOOP.
2006 Nov 10 6:31 AM
hi,
Check this out
http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm
Regards,
santosh
2006 Nov 10 6:34 AM
Thanks santosh..basically I am blur on this part...what it means?
CONSTANTS: C_IT(20) TYPE C VALUE '(SAPLEBNE)BSN[]',
ASSIGN (C_IT) TO <IT>.
LOOP AT <IT> ASSIGNING <WA>.
ASSIGN COMPONENT C_FIELD OF STRUCTURE <WA> TO <KUNNR>.
CHECK SY-SUBRC = 0.
<KUNNR> = VBAK-KUNNR.
ENDLOOP.
Whats is this part mean actually? '(SAPLEBNE)BSN[]'..calling a program??
2006 Nov 10 6:38 AM
Hi Justin
This is a way of indirectly reference to variables, work areas, internal tables of a different program.
Suppose we implementing a user-exit for a particular transaction. We might not have all the required variables used in the actual program, we can internally follow the above method to access the data declared in the original program.
Here SAPLEBNE is the program and BSN is the internal table the code is trying to access.
Internal table BSN can be found in include: LEBNETOP of program SAPLEBNE.
Program is related to Purchase Requistions.
Kind Regards
Eswar
2006 Nov 10 6:51 AM
Hi Eswar,
I think I understand more from your explaination.
However I still have doubt.
When you mention about actual program and original program, whats is the different?
Actually I saw this code in SAPMV45A program which are create sales order program for VA01, VA02 and VA03. What you means is SAPLEBNE is reside in SAPMV45A program and we can use the BSN internal table in SAPMV45A?
By the way, I am not doubting you mentioned that SAPLEBNE is a PR program, can tell me how you found out that?
2006 Nov 10 8:50 AM
HI Justin
Glad could give you some idea.
Depending on business scenarios we can have link between SO & PR.
Eg: Third Party Sales: SO -> PR -> PO.
Coming to your point of finding out how "SAPLEBNE" is PR related program: I have just checked the code by going to SE38, it is Function Pool program. Double Click on include "LEBNEUXX" i.e Function Modules: we can find PR related FM's.
As you were saying, you have found the code in SAPMV45A, it might have invoked some FM's in SAPLEBNE activating/populating few variables/internal tables. So we have the data residing in memory which can be assessed after the call to FM is finished.
Hope the info helps some more for your understanding.
Kind Regards
Eswar
2006 Nov 11 3:05 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |