FM or Table to get the BP ID of Root org unit
Hello All
We are triggering code from ECC which replicates Ship to Address to SRM.
We want to know an FM or Table which will provide us with the BP # of the root org unit. ( Purchasing company)
It is preferable if we don't have to hard code this.
Thanks
Kedar
Hi Kedar,
Create a custom table to store the business partner of the root org unit or the company code and then use that table to get the BP and create ship to address for that org.
The could BP will be different in different environmnet so you cannot hard code that .. also there is no function module to get the BP of the Root org id or compnay code...
there are FM and table to get all id of company code etc but all reuqire input busines spartner which you willhave to enter ...
Thanks
Iftekhar Alam
Similar Messages
-
What is the table to get the all planned orders related to a sale order
Hi,
May i know what is the table to get the all planned orders related to a sale order. My scenario is make to order scenario. we can get my out put final product by completing the nearly 916 planned orders.(Like major assemble,sub assemble). From this scenario i want the total orders related to a sale order. ( The planned orders from sale order to sale order will change. i.e 1 sale order will have 916 planned orders and one sale orders will generate 920 like that will chage when running mrp.). Now i want to pick the total planned orders for a sale order in a report. please guide me.
Regards,
Mastan.Hi,
Use the table PLAF... in this table pass the sale order no in the filed KDAUF and then execute...issue here is once the planned orders are converted production orders, these planned orders are deleted from the system....so you will not able to see them.....
Thanks
Kumar -
How SID table will get the data?
Hi,
Any one can please let me know, how the SID table will get the data. I am not able to trace.
Thanks in Advance.
Regards,
Suree.BHi
SID will not have data it will only contains data
when the masterdata loads it will also create corresponding SID's which can be later used to link master data table to fact table
cheers,
Swapna.G -
FM or table to get the batches and stock of material as in MMBE or MB51
Hi Gurus,
Please help me with function module or table to get the current batches
and unrestricted stock for the respective material and plant. And the reference transaction with is MMBE or MB51.
I want the same data as in MMBE or MB51 transaction.
Please reply me as soon as possible.
Regards,
SagarHi,
I dont think there is any BAPI for this (on 46C).
Instead, you can check following tables:
EINA, EINE, A017(Plant)/A018, KONH, KONP, KONM, KONW for Purchasing Info Records / conditions associated with it.
Hope this helps.
Best Regards, Murugesh AS -
Fm to get employee under manager of all org unit
hi,
i have requirement that i need list of all employee under particular manager i know abt HRWPC_PNP_MANAGED_EMPLOYEES but i don't know how to use it is thr any fm reg it .
thanks in advanceHi Rajan,
Below is the sample code for your reference...
REPORT zrnd.
*database tables used
TABLES:pa0001, "Infotype 0001 (Org. Assignment)
hrp1001, "Infotype 1001
pa0002. "Infotype 0002 (Personal Data)
*internal tables declaration
**----internal tables for holding
DATA:t1001 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1002 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1003 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1004 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1222 LIKE p1222 OCCURS 0 WITH HEADER LINE,
t0001 LIKE p0001 OCCURS 0 WITH HEADER LINE,
t0002 TYPE p0002 OCCURS 0 WITH HEADER LINE.
DATA: w1222 TYPE hrp1222 .
DATA : z1222 TYPE hrt1222 OCCURS 0 WITH HEADER LINE.
DATA: res TYPE swhactor OCCURS 0.
DATA: wa_res TYPE swhactor.
Data : f_code type ABTNR,
p_code type ABTNR,
f_text type VTEXT,
p_text type VTEXT,
s_pernr type Pa0001-PERNR,
s_name type pa0001-ename.
*variable declaration
**---0 to capture the id of the object "may be orgunit, position, persion.
DATA: g_sobid1 LIKE p1001-objid,
g_sobid2 LIKE p1001-objid,
g_sobid3 LIKE p1001-objid,
* *--to capture the personnel number
g_pernr LIKE pa0002-pernr.
Constants : c_function type c value 'F',
c_Proces type c value 'P'.
*selection screen paramters
**----enter a valid personnel number
PARAMETERS:p_pernr LIKE pa0002-pernr.
*start of selection
START-OF-SELECTION.
*Get the Position for entered Personnel number
*----RH_READ_INFTY function module is used for the OM infotypes ..starting with HRP
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'P'
objid = p_pernr
infty = '1001'
subty = 'B008'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1001
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
IF sy-subrc = 0.
* MESSAGE 'this number is not maintained in hrp1001' TYPE 'I'.
ENDIF.
*Get the latest record reading T1001 with following values
SORT t1001 BY begda DESCENDING .
READ TABLE t1001 WITH KEY objid = p_pernr "personnel number
otype = 'P' "Person
rsign = 'B' "hirarchy top down
relat = '008' "Holder
sclas = 'S'. "Position
IF NOT t1001[] IS INITIAL.
g_sobid1 = t1001-sobid. "ID of Related Object
*Get Org unit for the position obtained from above
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'S'
objid = g_sobid1
infty = '1001'
subty = 'A003'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1002
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
IF sy-subrc = 0.
ENDIF.
ENDIF.
SORT t1002 BY begda DESCENDING .
READ TABLE t1002 WITH KEY objid = g_sobid1
otype = 'S' "Position
rsign = 'A' "bottom up
relat = '003' "Belongs to
sclas = 'O'. "org unit
IF NOT t1002[] IS INITIAL.
g_sobid2 = t1002-sobid.
*Get position for the Org unit (Manager)
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'O'
objid = g_sobid2
infty = '1001'
subty = 'B012'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1003
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
ENDIF.
SORT t1003 BY objid.
READ TABLE t1003 WITH KEY objid = g_sobid2
otype = 'O' "org unit
rsign = 'B' "hirarchy top down
relat = '012' "Manages
sclas = 'S'. "Position
IF NOT t1003[] IS INITIAL.
g_sobid3 = t1003-sobid.
*Get Personnel number for the Manager
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'S'
objid = g_sobid3
infty = '1001'
subty = 'A008'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1004
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
* if sy-subrc <> 0.
* MESSAGE 'this number is not maintained in hrp1001' TYPE 'I'.
* endif.
ENDIF.
READ TABLE t1004 WITH KEY objid = g_sobid3
otype = 'S' "Position
rsign = 'A' "bottom up
relat = '008' "Holder
sclas = 'P'. "Person
IF NOT t1004[] IS INITIAL.
g_pernr = t1004-sobid+0(8).
**--Get name of Manager(Supervisor)
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = g_pernr
infty = '0001'
TABLES
infty_tab = t0001
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SORT t0001 BY pernr begda.
READ TABLE t0001 INDEX 1.
IF NOT t0001[] IS INITIAL.
write t0001-pernr to s_pernr.
write t0001-ename to s_name.
ENDIF.
Perform get_function_code using g_sobid2 .
ENDIF.
PERFORM display_results.
*& Form get_function_code
* text
* -->G_SOBID1 text
FORM get_function_code USING org_unit.
PERFORM get_obj USING org_unit.
PERFORM get_ab USING w1222-tabnr.
PERFORM get_text tables z1222.
IF z1222-attrib IS INITIAL.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'O'
act_objid = org_unit
act_wegid = 'A002'
* ACT_INT_FLAG =
* ACT_PLVAR = ' '
act_begda = sy-datum
act_endda = sy-datum
act_tdepth = 0
act_tflag = 'X'
act_vflag = 'X'
authority_check = 'X'
* TEXT_BUFFER_FILL =
* BUFFER_MODE =
* IMPORTING
* ACT_PLVAR =
TABLES
result_tab = res
* RESULT_OBJEC =
* RESULT_STRUC =
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT res INTO wa_res.
PERFORM get_obj USING wa_res-objid.
PERFORM get_ab USING w1222-tabnr.
PERFORM get_text tables z1222.
ENDLOOP.
ENDIF.
ENDFORM. "GET_TEXT
*& Form GET_OBJ
* text
* -->P_OB text
* -->P_OJ text
FORM get_obj USING p_oj.
SELECT SINGLE * FROM hrp1222 INTO w1222 WHERE otype = 'O'
AND objid = p_oj.
ENDFORM. " GET_OBJ
*& Form GET_AB
* text
* -->P_TAB text
FORM get_ab USING p_tab.
SELECT * FROM hrt1222 INTO table z1222 WHERE tabnr = p_tab.
ENDFORM. " GET_AB
*& Form GET_TEXT
* text
* -->P_Z1222_LOW text
FORM get_text tables p_txt STRUCTURE hrt1222.
loop at p_txt.
if p_txt-low+0(1) = c_function.
write p_txt-low to f_code.
SELECT single vtext FROM zfunctiont INTO f_text WHERE abtnr = p_txt-low.
ELSEIf p_txt-low+0(1) = c_Proces.
write p_txt-low to P_code.
SELECT single vtext FROM ZPROCESST INTO p_text WHERE abtnr = p_txt-low.
endif.
endloop.
ENDFORM. " GET_TEXT
form display_results.
write :/ s_pernr,
30 s_name.
WRITE :/ f_code,
30 f_text.
WRITE :/ p_code,
30 p_text.
ULINE.
endform.
Thanks,
Chidanand -
% distribution of all the employees in a particular org unit
Hello To all,
I am working in Objective Setting and Assessments, I am having a one reporting requirment where I need to show % distribution of all the employees in a particular org unit. I kept 0ORGUNIT in row and Keyfigure 1ROWCOUNT in column,
I have created a formula for % distribution of all the employees -> %GT " No. fo Records"
I am bit confused that weather i should take %GT or %CT, %RT
Wt is difference between that formulas.
Kindly suggest
Thanks
ShaliniHi Shalini,
%CT gives the share of the result, for example in a Regios if you have 10 employees then for each row it gives the employee share for that Region.
%GT gives the share of the result from the Grand Total, for example if you have 10 regions then it caluculates each row it gives the employee share from all the Regions Grand Total.
%RT gives the share from the Report Result for each employee.
In your case you need to use the %GT, then for each region result area it gives % of distribution of all the employees.
Hope this helps.
Veerendra. -
Table to get the list of all tables in the database
hi,
please let me knwo the table where i can get the list of all tables in the databasehi,
please let me knwo the table where i can get the list
of all tables in the databaseHi Michael,
Will you EVER start reading some documentation?
I guess it's not far that many regulars won't reply to those kind of questions.
Believe me, reading doesn't hurt (well, at least, most of the times).
Rgds,
Guido -
How to link between these tables and get the bom explosion
tables : mast,stpo,makt
SELECT AMATNR BMAKTX CIDNRK CMENGE C~MEINS INTO CORRESPONDING FIELDS OF TABLE IT_COMP_IDEL FROM
MAST AS A INNER JOIN MAKT AS B ON AMATNR = BMATNR
INNER JOIN STPO AS C ON ASTLNR = CSTLNR
WHERE AMATNR IN S_MATNR AND AWERKS IN S_WERKS.
using cs13 to get the bom summary
using these table to but i got only few materials only,
but cs13 got more materials
how can i solve that one
Regards
dsHi,
Just go through this program i think it will help u out.
TABLES: MARA, MARC.
TYPE-POOLS : fibs,stree.
TYPES: BEGIN OF STRUCT_BOM,
MATNR TYPE MATNR, " Material Number
WERKS TYPE WERKS_D, " Plant
IDNRK TYPE IDNRK, " BOM Item
STLAL TYPE STLAL, " Alternative BOM
STUFE TYPE HISTU, " BOM Level
OJTXB TYPE OJTXB, " Object description (assembly)
END OF STRUCT_BOM.
*- table types
types: t_bom type table of struct_bom.
*Internal Tables to hold the BOM data.
DATA: ITAB_BOM type table of STRUCT_BOM.
DATA: WA_BOM TYPE STRUCT_BOM,
wa_stb type stpox,
wa_matcat type stpox.
DATA: IT_STB type standard table of STPOX,
IT_STBC type standard table of STPOX,
IT_MATCAT type standard table of CSCMAT.
*-- to enter BOM DATA
*Selection Options
select-options: s_matnr for V_matnr, "BOM Material
s_plant for V_werks. "BOM Plant
*Input Parameters
parameters: p_alter type stko-stlal, "Alternate BOM
p_usage type stzu-stlan, "BOM usage
p_appli type tc04-capid, "BOM Application
P_CATE TYPE STKO-STLTY DEFAULT 'M'. "BOM Category
INITIALIZATION.
REFRESH ITAB_BOM.
CLEAR WA_BOM.
REFRESH IT_STB.
REFRESH IT_MATCAT.
START-OF-SELECTION.
SELECT matnr
werks
stlal
INTO CORRESPONDING FIELDS OF TABLE itab_bom
FROM mast
WHERE matnr IN s_matnr
AND werks IN s_plant
AND stlan = p_usage
AND stlal = p_alter.
CLEAR V_MATNR.
CLEAR V_WERKS.
DATA: WA_STB TYPE STPOX,
WA_MATCAT TYPE CSCMAT.
v_matnr = wa_bom-matnr.
v_werks = wa_bom-werks.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = p_appli
datuv = sy-datum
mktls = 'X'
mehrs = 'X'
mtnrv = v_matnr
stlal = p_alter
stlan = p_usage
werks = v_werks
TABLES
stb = it_stb
matcat = it_matcat
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Then just print whatever data u want it_stb, it_matcat tables.
reward points if u find my answer helpfull. -
Table to get the list all the RFCs
Hi Experts,
Is there any way to get the list of all the RFCs which are using a particular communication user ?
Can you please let me know any sap table such that it can provide the list of all the RFCs which are using a particular communication user ?Hi,
To my knowledge, there is no such table.
If I want to know which RFCs are called by a particular user, I use ST03 for last month --> RFC Profile s --> RFC Server profile
I select the USER tab, and I double click on the user I'm interested in.
All the RFCs called by this user are now displayed. I hope that this is the information that you need.
Regards,
Olivier -
Tables to get the billing plan discount percentage...
Hello Experts,
I am currently developing our sales invoice form and 1 requirement is that I have to show the
billing plan/downpayment %. The specs only has the field FPLNR. Can you please tell me how to get the
% amount.
Thank you guys and take care!hi
you can get the billing date FPLT-AFDAT and billing discount perecntage FPLT-FPRO by making use of the key field FPLNR
hope this helps
regards
Aakash Banga -
How to get the General Manager of an Org. Unit?
Hi experts,
Given a BP, I want to find out to which Org. Unit it belongs to and furthermore the name and email of the General Manager of that Org. Unit.
Any hints or ideas on how to go about it?
Thanks in advance.Hi,
maybe one of this options will help you:
- Function module CRM_ORGMAN_ORGOBJECTS_FIND_2
- Method GET_ORG_UNIT_DETAILS of class CL_CRM_PPM_UM_TOOLKIT
good luck.
Kind regards
Manfred -
Any report to see what are the users assigned to an org-unit ?
Hi All,
Is there any standard report available to see what are the users assigned to a particular org-unit?
I'm looking for complete list of users assigned to a particular org-unit both directly and indirectly/
Thank you so much in advance !!
Cheers,
Gyan.Hi,
None of them actually helped.
Trx PC00 is not available in 4.0 sytem. And from the table mentioned i don't see the org-unit value. Could you please elaborate on this.
Thanks,
Gyan. -
Report to the employee list under an org unit for a specific PSA
Hello Experts,
Is there any standard report to see the list of employees belonging to a particular sub org unit under a particular personnel sub area?
For eg: There is a company X, and it has got 3 plants in blore, mumbai and chennai.
Blore , chennai amd mumbai represent the personnel sub area for the company X.
to see the list of employees working under operational sub org unit , under the org unit of company X in blore, is there any standard report in SAP??
Helpful answers will be awarded
thanks and regards,
Pooja DevHi Pooja,
Use Report RPLMIT00.
Choose Org structure on it.
Let me know.
Arti -
How to know is the User assinged to any org unit in PPOSA_BBP or not
Hi All,
We have a requirment where need to check is a user is assigned to org uni n PPOSA_BBP or not.
how can we do this..
Regards
cbHello,
Hope this might be helpful.
1. Based on missing relationships:
In SRM relationships are O-S-CP-P,
From HRP1001, check the CP to S relationships, take the list of CP & compare with total number of CP from HRP1000, Delta will show CPs not tied to positions. you can extend the logic based on requirement.
2. Based on missing inherited attributes:
Root Org level attributes are inherited top to bottom. Read one specific attribute of user & compare with root level attribute. You can use standard FM for this.
Thanks
Ashutosh -
How to join two tables and get the supply delivery date next to order?
So there are two tables. One has customer's order no, ordered date, order quantity, available quantity and code of article-
The other table comes form supply side where we have supply order no, article number, ordered qty, and delivery date.
We keep stock so this can not be MOT (made to order) system.
What i need is correct date of arrival to appear next to cusotmers spoecirfic order. The older cusotmers order get's the parts first, second oldest order is next in line etc.
here is any example
customer's order
ref order
art. code
ordered qty
available qty
order date
1809202491
700497
60
0
3.7.2014
1809200528
700497
13
0
20.6.2014
1809198640
700497
7
0
9.6.2014
supply order
supply order
art. code
qty orderd
date of arrival
4501243378
700497
50
4.8.2014
4501263437
700497
20
6.10.2014
There is actually a 3rd "table" and that sort of connects the two and that is stock on hand per art. code.
The main issue is that stock is assigned to purchase orders only when it actually arrives in the warehouse.
A human can easilly connect the dates of when the stock will arrive and quantities with correct customer's order. In this case the firts order will get 50 pcs in August while 10 pcs will remain on backorders. The missing 10 pcs Will arrive in October. The second order will get 10 pcs in october and 3 will remain on backorders with no delivery date. While the third customer orders does not have a delivery date.
So how to make the SAP do this calculations and display the arrival date next to date of customer's order?I checked the instructions as i do not have access to this part. It seem this is a query. We had issues with queries in the past as not all codes from orders would appear in them. They never found the reason why that is happening.
However, I think the main issue is that the information here is not connected and is separately provided for supply and for sales. So i doubt it can be connected in this query.
edit: as you can see the only connection is stock on hand.
and total number of various items we have is close to 100.000 of various article codes.
Maybe you are looking for
-
Incorrect display of punctuation (parentheses, periods) in .PDF forms.
The .PDF file attached here was downloaded from the US Department of Homeland Security. I need to fill in this form with Adobe Reader 9.1.3, but some of the punctuation is displayed and printed incorrectly positioned. For example, in Section A of the
-
HELP NEEDED PLEASE!!!!!! LOST MEMORY CARD
today i lost my 4GB memory card which had all my pictures songs voicenotes bbm convoes etc on it is there any possible way at all that i can retrieve all of this
-
Simplest way to duplicate a website?
Hi! I'm new to iWeb, but I have rather proudly managed to make and publish a site. The site is in my native language, now I wish to make a second version in English (with some help with the translation , that is!) My question is: Can I just "copy-pas
-
Tengo varios problemas con photoshop cs. Cuando intento entrar a la paleta de COLOR SETTINGS automaticamente el programa se queda como colgado y no responde, aparece el color piker y muere ahi. Tengo que hacer un FORCE QUIT con la mac para poder segu
-
Illustrator CS5 automatically switching monitors
Hello, I am running Illustrator CS5 on Windows 7 64 with dual monitors and my problem is that every time I open Illustrator it starts on the main monitor to the left. All of the other CS5 applications remember where they start and stay there. If I