Postion creation
Is there any function which can create positions and return position number, so that I will use that position for creating others relationships like org unit, report to, job, cost center, 1002, 1007, 1008, 9103 and 9106?
One action has configured using PP03 to create the above PD infotypes, but the above custom infotype (9106) is dependent on 1007..As Batch input will not create a position for the above action until the end of action..9106 is not properly triggering..
That is why we need some function which can create 1000 and return the position number
Please throgh the if any one has idea how to do it..
here is a sample program that uses the above two function modules..
*& Report ZINC1 *
report zinc1.
data: w_objid type hrobjid,
w_sobid type sobid value '01002533'.
call function 'RH_OBJECT_CREATE'
exporting
plvar = '01'
otype = 'S'
stext = 'TEST'
begda = sy-datum
endda = '99991231'
importing
objid = w_objid
exceptions
text_required = 1
invalid_otype = 2
invalid_date = 3
error_during_insert = 4
error_ext_number = 5
undefined = 6
others = 7.
if sy-subrc eq 0.
call function 'RH_RELATION_MAINTAIN'
exporting
act_fcode = 'INSE'
act_plvar = '01'
act_otype = 'S'
act_objid = w_objid
act_rsign = 'A'
act_relat = '003'
act_sclas = 'O' "Obj Type of Orgn Unit
act_sobid = w_sobid
exceptions
maintainance_failed = 01.
if sy-subrc = 0.
* relationship mainatined
write:/ 'Position:', w_objid, 'was created under Org Unit:', w_sobid.
else.
* relationship wasn't created.
Regards,
Suresh Datti
Similar Messages
-
Deleting TO postions during creation of TO from TR
Hi Gurus,
is there a possibility to delete TO positions during the creation process.
Requirement is:
I have a Transport Requirement of material x with an amount of 1000 pc. The TR is converted to a TO automatically (RLAUTA10).
The warehouse situation is the following:
700 pc of material x are on storage bin 1234
900 pc of material x are on storage bin 4567
With the batch job 2 TO positions are created. 700 form bin 1234 and 300 from bin 4567.
I want to avoid 2 TO positions in this case, there should only be one position with the 700 pc.
Is there a way to achieve this?
Thanks in advance.Hi
Its not clear, could u pls clarify.
is your requirement to create single TO from TR instead of 2 TOs? - if so, it depends on your Picking strategy, pls set your Stock Removal strategy accordingly.
Rgds
Ram -
BAPI for automatic Pr creation witth multiple files from excel sheet
I have written a programm for automatic PR creation with the help of bapi , where its picks data from excel sheet and makes PR .It is picking excel files from one folder(Files) for PR creation and moving to another folder(Files sucess).
now the problem is if Folder (Files) contains one excel sheet ,PR is created fine , but if the Folder(Files) have multiple excel sheet ,its is creating 1st PR right, but next PR's contains all the line item of 1st PR , 2nd PR and so on .can anyone suggest me where is the problem in codes.
types : begin of x_file ,
key1(10),
pur_grp(4),
maktx(40),
plant(4) ,
req(10),
s_qty(13),
wbs(24),
gl(10),
trackno(10),
supl(4),
deladd(255).
types : end of x_file .
data : str5 type char10.
data : mm type char2.
data : yyyy type char4.
data : dd type char2.
data : str9 type char10.
data : str6 type char10.
data : month type char2.
data : year type char4.
year = sy-datum+0(4).
month = sy-datum+4(2).
dd = sy-datum+6(2).
yyyy = sy-datum+0(4).
mm = sy-datum+4(2).
dd = sy-datum+6(2).
clear str6 .
clear str5.
concatenate dd'.' month '.' year into str5 .
concatenate yyyy mm dd into str6 .
DATA : file type rlgrap-filename .
data : it_file type table of x_file .
data : wa_file type x_file .
data : it_header type table of x_file .
data : wa_header type x_file .
*& Internal Table For Define Row and Coloum Postion
data: col_start type i value 1 ,
row_start type i value 2,
col_end type i value 256 ,
row_end type i value 65000 .
*& Internal Table For Retrieve Data From Excel
*data: excel_bdcdata like kcde_cells occurs 0 with header line.
*data: excel_bdcdata1 like kcde_cells occurs 0 with header line.
data: excel_bdcdata like ALSMEX_TABLINE occurs 0 with header line.
data: excel_bdcdata1 like ALSMEX_TABLINE occurs 0 with header line.
data: it_index type i.
DATA : IT_INDEX1 TYPE I.
*& Define Field Symbol
field-symbols: <fs> .
data : bdcdata like bdcdata occurs 0 with header line.
data : messtab like bdcmsgcoll occurs 0 with header line.
data : req_items type table of bapiebanc .
data : wa_req_items type bapiebanc .
data : req_acc_asg type table of bapiebkn.
data : wa_req_acc_asg type bapiebkn.
DATA : RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .
*data : return type table of bapireturn.
*data : wa_return type bapireturn .
data : number type ebeln .
*****************************MOVE FILES******************************
data : xsource type string .
data : xdestin type string .
data : destin1 type string .
data : destin2 type string .
DATA : DEST1 TYPE STRING.
DATA : DEST11 TYPE STRING.
DATA : DEST2 TYPE STRING.
DATA : DEST22 TYPE STRING.
data : sou_dir_name like SALFILE-LONGNAME.
data : tar_dir_name like SALFILE-LONGNAME.
data : tar_dir_name1 like SALFILE-LONGNAME.
data : sou_filename like EDI_PATH-PTHNAM .
data : tar_filename like EDI_PATH-PTHNAM .
data : filename1 type string .
data : tar_filename1 like EDI_PATH-PTHNAM .
data : file_itab like SALFLDIR occurs 0 with header line.
data : wa_file_itab like SALFLDIR.
data : file_count type i .
data : dir_count type i.
data : dir_table like sdokpath occurs 0 with header line.
data : file_table like SDOKPATH occurs 0 with header line.
data : wa_file_table like sdokpath.
data : strr type string ,
str1 type string ,
str2 type string ,
str3 type string .
DATA : PA_VAL TYPE CHAR1.
sou_dir_name = 'D:\barcodes\files\'.
tar_dir_name = 'D:\barcodes\files-success\'.
"success folder.
CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
EXPORTING
DIRECTORY = sou_dir_name
FILTER = '.'
IMPORTING
FILE_COUNT = file_count
DIR_COUNT = dir_count
TABLES
FILE_TABLE = file_table
DIR_TABLE = dir_table
EXCEPTIONS
CNTL_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
loop at file_table into wa_file_table.
clear : strr , str1 , str2 , str3 .
strr = wa_file_table-PATHNAME .
concatenate sou_dir_name strr into str1 .
concatenate tar_dir_name strr into str2 . " success
concatenate tar_dir_name1 strr into str3 . " failed
FILE = STR1 .
*start-of-selection.
*& Function For Retrieve Data From Excel
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = FILE
i_begin_col = col_start
i_begin_row = row_start
i_end_col = col_end
i_end_row = row_end
tables
intern = excel_bdcdata
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF sy-subrc NE 0.
WRITE : / 'File Error'.
EXIT.
ENDIF.
loop at excel_bdcdata.
translate excel_bdcdata to upper case .
move excel_bdcdata-col to it_index.
assign component it_index of structure wa_file to <fs> .
move excel_bdcdata-value to <fs>.
at end of row.
append wa_file to it_file .
clear wa_file.
endat.
endloop.
sort it_file by key1. "pur_grp maktx plant .
it_header[] = it_file[].
delete adjacent duplicates from it_header comparing key1 pur_grp maktx
plant .
data : h_item(5) type n .
data : h_pack(10) type n .
data : line_no(5) type n .
data : ln_no(5) type n .
loop at it_header into wa_header .
ln_no = 1.
h_item = h_item + 10.
h_pack = h_pack + 1.
wa_req_items-preq_item = h_item .
wa_req_items-doc_type = 'BOM'.
wa_req_items-pur_group = wa_header-pur_grp .
wa_req_items-MATERIAL = wa_header-maktx .
wa_req_items-plant = wa_header-plant .
wa_req_items-pckg_no = h_pack .
wa_req_items-deliv_date = str6 .
wa_req_items-item_cat = '0'.
wa_req_items-acctasscat = 'P'.
*wa_req_items-distrib = '2' .
**wa_req_items-gr_ind = 'X'.
wa_req_items-ir_ind = '2'.
wa_req_items-purch_org = 'TISL' .
wa_req_items-QUANTITY = wa_header-s_qty.
wa_req_items-PREQ_NAME = wa_header-req.
wa_req_items-SUPPL_PLNT = wa_header-supl.
wa_req_items-trackingno = wa_header-trackno.
append wa_req_items to req_items .
clear wa_req_items.
wa_req_acc_asg-preq_item = h_item .
wa_req_acc_asg-g_l_acct = wa_file-gl .
WA_req_acc_asg-wbs_elem = wa_header-wbs .
append wa_req_acc_asg to req_acc_asg .
clear wa_req_acc_asg.
h_pack = h_pack + 1 .
endloop.
clear ln_no .
***BREAK-POINT.
*& BAPI FUNCTION
call function 'BAPI_REQUISITION_CREATE'
importing
number = number
tables
requisition_items = req_items
requisition_account_assignment = req_acc_asg
return = return .Can someone please give me sol........
-
Fields in Creation of free goods VBN1
hi everybody,
Can somebody expalin in detail the fields in creation of free goods(T-vbn1) like free goods quantity,additional quantity,documnet quantity and calculation rule....
<b>Please dont copy paste anything form SAP help....I read that one......</b>
I would appreciate if u explain with your sentence..
Will reward point if it helps.
GhassanHi Gafoor,
Material
Material, for which free goods is to be
granted
Minimum quantity
Minimum quantity for which free
goods can be granted
From
Quantity of sales material
FGQ--- Quantity unit of free goods material
Free goods -- Quantity of free goods with reference to the quantity and quantity unit of the sales material.
AQU - Quantity unit of the free goods additional quantity
Rule - Calculation rule
Prorata
whole units
unit related
D -- Delivery controlling - it tells how you can manage the delivery of free goods with respect to the main item ordered.
Additional material - Additional material (only available for entry in exclusive free goods)
Hope it helps. Please reward if helpful.
Thanks & Regards
Sadhu Kishore -
Account determination error - in creation of invoice
Hello experts,
i have an error in creation of invoice, after( pgi post goods issue)
will you please help me out to solve this error.
thanks & Regards,
yogesh rainahello sir,
After going throuth this path it shows no gl account in account determination chart
as below
Condition type Message Description
ZPR0 123 Access KOFI not carried out (initialized field)
Access Message Description
10 123 Access KOFI not carried out (initialized field)
20 121 No G/L account found in Account determination type KOFI
30 123 Access KOFI not carried out (initialized field)
40 121 No G/L account found in Account determination type KOFI
50 121 No G/L account found in Account determination type KOFI
60 123 Access KOFI not carried out (initialized field) -
Automatic PO creation of free text PR
Hi!
We have all our PRs in free text since we are not yet using material master. One of our purchase organization will only order from one vendor and they will enter that vendor and price in the PR. Is it possible to create a PO automatically from that PR without a material or source list?
Sincerely
AndersHi
Thank you very much. Is it possible to restrict the automatic creation to a certain purchase organization?
If I understand you right:
1) Create PR with item category D Service
2) Activate automatic PO creation in ML91
That will create POs for all PRs created as a service?
Sincerely
Anders -
Issue in creation of plant related data at receiving server using BD10
Hi all,
This is regarding Material master creation using B10.I am using MATMAS05 message type for sending data from one system to another.Data is sent and received successfully.When i go in mm03 i can see all the views created successfully accept views related to PLANT.Please guide to resolve the issue.
When i entered into Log-
1)"The field MBEW-BKLAS is defined as a required field; it does not contain an entry".
2)"No material master data exists for material AB_08.04.09(30) in plant 4001".
My segemnt is as follows-
ZMATMAS05 matmas05
E1MARAM Master material general data (MARA)
Z1KLART KLART----
My extention
E1MARA1 Additional Fields for E1MARAM
E1MAKTM Master material short texts (MAKT)
E1MARCM Master material C segment (MARC)
Z1AUSPM E1AUSPMDistribution of Classification:----
My extention
E1MARC1 Additional Fields for E1MARCM
E1MARDM Master material warehouse/batch segment (MARD)
E1MFHMM Master material production resource/tool (MFHM)
E1MPGDM Master material product group
E1MPOPM Master material forecast parameter
E1MPRWM Master material forecast value
E1MVEGM Master material total consumption
E1MVEUM Master material unplanned consumption
E1MKALM Master material production version
E1MARMM Master material units of measure (MARM)
E1MBEWM Master material material valuation (MBEW)
E1MLGNM Master material material data per warehouse number (MLGN)
E1MVKEM Master material sales data (MVKE)
E1MLANM Master material tax classification (MLAN)
E1MTXHM Master material long text header
E1CUCFG CU: Configuration data
E1UPSLINK Reference from Object to Superior UPS
Thanks.
Edited by: sanu debu on Apr 27, 2009 7:10 PMCREATE CONTROLFILE SET DATABASE "NEWDB" NORESETLOGS ARCHIVELOGAlso when you are setting a new database, the option should be RESETLOGS and not NORESETLOGS.
'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\ONLINELOG\O1_MF_2_7FK0XKB8_.LOG
D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_SYSTEM_7FK0SKN0_.DBFWhy underscore(_) at the end of the datafile name. Any specific reason ? -
Issue in Creation of new Value Field in CO-PA
Hi,
I have a query in CO-PA Value Field Linking.
In my Development Client,
1. Created a New Value Field (No Transport Request Generated)
2. Linked to the above to new Conditon type created in SD. (Tranport request was generated) i.e. in Flow of Actual Values->Transfer of Billing Documents->Assign Value Fields
However then i try creating a new Value Field in my Production Client it throws a message 'You have no authorization to change Fields".
Is this an issue with authorization or i need to transport the Value field too from Development to Production client.
Please Advise.
Thanks in Advance,
SafiThanks Phaneendra for the response.
The creation of Value field did not create any tranportation request. Will this too be transported if i transport the Operating Concern.
Please Advise.
Thanks,
Safi -
Issue in creation of control cycle
Dear Gurus,
During creation of control cycle (LPK1), the fields for source information is not appearing in my system.
I compared control cycle in a different ECC system where source information is appearing.
How can make the screen appear in my ECC system.
Please find the screenshots.
Any pointers will be highly appreciated.
This thread is further to the threads in Production Planning and LE/WM Forum. I could not resolve the issue with the threads.
Hope that I will get any pointer in EWM forum.
http://scn.sap.com/thread/3609441
http://scn.sap.com/thread/3610822
With Regards,
MalayHello Malay,
Can first contact your ABAPer and ensure the bottom screen is not an Screen Enhancement?
If it is a some custom development, your ABAPer can help you on the logic behind it.
Else, Let us know.
Regards,
Sathish -
Issue in Creation of XML file from ABAP data
Hi,
I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format.
The required format is
-<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>
- <Header2 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 10 fields>
<Header3 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
<Header4 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 4 fields/.>
<Header5 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
</Header2>
</Header1>
Iu2019m using the call transformation to convert ABAP data to XML file.
So please anybody can help how to define XML structure in transaction XSLT_TOOL.
And one more thing, here I need to put the condition to display the Header 3, Header 4, Header 5 values. If there is no record for a particular line item in header 3, 4 & 5, I donu2019t want to display full line items; this is only for Header 3, 4 & 5.
Please help me in this to get it resolved.Hello,
you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
Regards Otto -
What are the mandatory fields while creation of material master in differen
what are the mandatory fields while creation of material master in different views?
Hi Gopi,
This is purely depends on the function configuration, which would be done MM consultants. Kindly check with them.
thanks & regards
Kishore Kumar Maram -
BADI for changing fields during Creation of BP in CRM
Hello to everyone,
I need to find a BADI (or other way) to default several fields during BP creation in CRM (4.0 SR1 SP9). The fields I will like to set are TAX TYPE, TAX NUMBER, TAX CATEGORY, etc.. I have found the BADI BUPA_TAX_UPDATE but i dont see any suitable parameters (structures) to changes these fields. Please advice and thanks in advance.Hi
If you use function BUPA_NUMBERS_GET then your BP number will already be buffered and you can avoid a DB read. It may also be that the BP is not in the DB yet anyway.
You can only pass one GUID in at a time - loop through IT_CHANGED_INSTANCES into a variable of type BU_PARTNER_GUID and pass that into the function as input parameter IV_PARTNER_GUID.
Cheers
Dom -
Error in creation of purchase materials/Goods receipt against PO(FI-MM)
Hi All,
While processing FI - MM integration iam facing below errors,request to guide me with same
1) While creation of purchase materials
Valuation class 7920 not allowed for material type Raw material Message no. M3180
Diagnosis
The combination of values you have entered is not defined in the system.
Procedure
Check your entries, and choose a valid value or combination of values with F4.
I have crossed checked in t code OMSK valuation class 7920 exists.
2) Goods receipt against PO:
Number range for trans./event type WE in year 2014 does not exist Message no. M7562
Diagnosis
The number range for document number assignment has not been maintained in the year 2014 for the transaction/event type WE.
Procedure
Contact your system administrator.
in second case i have maintained number ranges in OBA7,OMBT,still iam facing with the same issue
Regards
SantoshHi Dev,
Thanks for your reply...yea i have done the ground work before posting this query
but bitt confused with the post i have come across..
Problem was occurring due to the wrong updating of raw material instead of finished goods in MM01 (CREATION OF PURCHASE MM)
however i have over come my 2nd issue,hopefull will over come my 1st issue also
Thanks a lot
Santosh -
Hi SDN,
Im trying to create Generic Data source of View Method. I wanted to create View on BSID ( Closed Customer Invoices) and BSAD ( Open Customer invoices) Tables, But while creating its giving error as "THERE IS NO RELATION BETWEEN THE TABLES" I want to know how to create Relation Between the tables. Both BSID & BSAD are standard tables, so we cant make any changes.
Please let me know the procedure to bulid Rlation between the tables.
Regards
SujanHi Siva,
You have to give relation between these two tables in tab "Table/Join Conditions".
Creating Views:
http://help.sap.com/saphelp_webas620/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
View creation fr generic extraction
Hope it Helps -
Automatic TO creation and confirmation for a Material document
Hi Dear All,
i am new to MM andWM.
I have to customization for auto transfer orders and confirmations for material documents what ever created with 101 movement type in Inventory Management. I have down configuration like below.
SPRO->Logistics Execution->Warehouse Management->Activities->Transfers-> Set Up Autom. TO Creation for TRs / Posting Change Notices
Double click on control data tab
Hear for my warehouse I given input like Auto TO = 1,
AddId = select check box.
And in Assign control tab for 101 movement type I have given input like below.
Automatic TO = 1.
TO item can be confirmed immed. = tick checkbox
Propose Confirmation = tick checkbox.
Foreground/Backgrnd = D.
After creating of Material document I am executing report RLAUTA10 in SE38.When I execute this report system showing message like TO processing finished: TR total: 17, TO created: 0, Errors: 17.
If I check header details of transfer requirements in LB03, i am not seeing Tick Mark in Auto TO Creation field.
Can any one tell me what the mistake i have down or if i need to do any further configuration. Please help me regarding this concern?
Thanks in Advance..Dear Steve,
Thanks a lot for giving reply with what I need to do, but I am unable to see result.
I have down configuration like below even though system not processing Auto TO creation. Can you explain me if I have down any mistake below.
Click on Assign button,
Press on New entries
WhN = 900
Reference Movement Type = 101
Movement indicator = B
Movement type for Whse Mgmt = 101
TR create Transfer Requirement = X
Immed.TO Creation
Mail confirmation for background processing = 01.
GR date = 2
Maybe you are looking for
-
I cannot log into either Disqus or (it seems) Livefyre. When I attempted to submit a report to Disqus, I get a 403 error code. In Livefyre, when I make comments, they appear on my screen, but apparently not on anyone elses (repeated requests for a pi
-
Is there any way to find out the serial number to an old ipod that i cannot find?
theres a recall on the od ipod nanos the 1st generation ones and i purchased one and im not sure when and currently i am unaware of the whereabouts of the ipod. is there any way to find out the serial number without actually finding the ipod to confi
-
Characters such as hearts and stars won't show up on Firefox
I'm running on a Mac OS X 10.4.11 and my Firefox is 3.6.6. When I run all my other browsers (safari, opera) I'm able to see characters such as hearts and stars on a site like facebook. Only on firefox does it not show up, it doesn't even show boxes -
-
Error on Dir 11.5, no error on Dir MX
Can any clever soul tell me why the behaviour below gives an error "String does not end correctly" in 11.5 on a Mac, but compiles and works properly in dir MX? -- postNetText global gNetID on mouseUp me URL = "http://www.dummyURL.com/perltest/tstqu
-
Release Java Application with DB & Tables
Hello all, I searched for a long time but cannot really find an answer to my question. I want to create a desktop application and within this application I want to use a database for some data management. Later I want to be able to start my applicati