Double Document number Generation from Z-tables -urgent
I have a Z table with a number range and my user performs some task and when they press save button , a number is selected from the Z table, now problem is that when two users press ave at same instant same number is assigned to both for different entries -- try to sort this urgently
Hi Joshi,
Use Locks or Enque and Deque statements. Refer the following link.
http://help.sap.com/saphelp_47x200/helpdata/en/a3/df5b1ee1bed348b198719e50af835d/frameset.htm
regards,
Chandra.
Note: Please reward if helpful.
Similar Messages
-
To read data from cluster table urgent
i need to get personnel number(PERNR) from BSEG table which is a CLUSTER TABLE
what else i have to add in here to get personnel number(PERNR)
this code is giving no data only lots of ZEROS
FORM getexpcode1 TABLES in_tab21 STRUCTURE itcsy
out_tab21 STRUCTURE itcsy.
DATA : w_belnr LIKE bseg-belnr,
w_bukrs LIKE bseg-bukrs,
w_gjahr LIKE bseg-gjahr,
w_pernr like bseg-pernr,
w_invnos(255).
Read company code
READ TABLE in_tab21 INDEX 1.
IF sy-subrc = 0.
w_bukrs = in_tab21-value.
ENDIF.
Read document number
READ TABLE in_tab21 INDEX 2.
IF sy-subrc = 0.
w_belnr = in_tab21-value.
ENDIF.
Read Fiscal Year
READ TABLE in_tab21 INDEX 3.
IF sy-subrc = 0.
w_gjahr = in_tab21-value.
ENDIF.
SELECT pernr FROM bseg
INTO w_pernr
WHERE bukrs = w_bukrs
AND belnr = w_belnr
AND gjahr = w_gjahr.
ENDSELECT.
READ TABLE in_tab21 INDEX 1.
out_tab21-value = w_pernr.
MODIFY out_tab21 INDEX 1 TRANSPORTING value.
ENDFORM. "GETEXPCODE1hi,
try:
SELECT pernr FROM bseg
INTO w_pernr
WHERE bukrs = w_bukrs
AND belnr = w_belnr
AND gjahr = w_gjahr
AND PERNR <> SPACE.
ENDSELECT.
A.
Message was edited by:
Andreas Mann -
How to change Employee Number Generation from Manual to Automatic
Hi,
We have given Employee Number Generation Manual while creating Business Group. Now we want to change that to Automatic. I have tried to change but I count not.
Please tell me what are all the steps needed to change Employee Number Generation From Manual to AutomaticHi,
1. Goto org screen --> query business group
2. Click other --> Business Group info
3. Change second option from Employee Number Generation from Manual To Automatic.
Also look
Employee number generation process
Hope it work for u.
Ayaz
Edited by: Ayaz on Dec 20, 2010 7:15 PM -
Intercompany document number BVORG in asset table ANEK
When posting asset inter company asset transfer, I expected to see in table ANEK (Document Header Asset Posting) field intercompany document number (BVORG) filled in. However it is empty. Is there configuration that influences this? I need this for reporting purposes, where I need to get it from ANEK.
Hi,
whatever your are using document type for cross company code asset postings - open Tcode- OBA7
select Ex: AA document type - select inter company posting in control data save it ,
then post cross company code asset posting - system automatically create Document number with company code + year - Ex : 1500000000+1000+2014 like (150000000010002014)
whatever your assigned for asset posting document type number range
Note : no need to separate number range for inter company asset transfer transaction
then automatically update in table ANEK - field BVORG
Mahesh -
Dear friends,
I am using function module K_COSTS_PLAN_INTERFACE_TOTAL to upload the Planning costs, After this function module call I need the document number generated for that item, but there is no return parameter from this function module which would give me the document number generated. Please let me know how to get the document number after this function module call.Hi...
Try this function module..
CALL FUNCTION 'BAPI_DOCUMENT_GETLATEST2' "
EXPORTING
documenttype = " bapi_doc_aux-doctype Document type
documentnumber = " bapi_doc_aux-docnumber Document number
documentpart = " bapi_doc_aux-docpart Documentation - text lines
documentversion = " bapi_doc_aux-docversion Document version
multilevelexplosion = 'X' " bapi_doc_aux-flag Document management indicator
* docbomchangenumber = SPACE " bapi_doc_draw2-ecnumber Change number
* docbomvalidfrom = SY-DATUM " bapi_doc_draw2-validfromdate Valid-From Date
* docbomrevisionlevel = SPACE " bapi_doc_draw2-revlevel Revision level
* loadlatest = 'X' " bapi_doc_aux-flag Document management indicator
* loadlatestreleased = 'X' " bapi_doc_aux-flag Document management indicator
* search_new_maindoc = SPACE " bapi_doc_aux-flag Document management indicator
* getdocdata = SPACE " bapi_doc_aux-flag Document management indicator
* getobjectlinks = SPACE " bapi_doc_aux-flag Document management indicator
* getdocdescriptions = SPACE " bapi_doc_aux-flag Document management indicator
* getlongtexts = SPACE " bapi_doc_aux-flag Document management indicator
* getstatuslog = SPACE " bapi_doc_aux-flag Document management indicator
* getdocfiles = SPACE " bapi_doc_aux-flag Document management indicator
* getcomponents = SPACE " bapi_doc_aux-flag Document management indicator
* getclassification = " bapi_doc_aux-flag Document Management Indicator
* getstructures = " bapi_doc_aux-flag Document Management Indicator
* getwhereused = " bapi_doc_aux-flag Document Management Indicator
* sortf_exclude = SPACE " stpox-sortf Sort string
* sortf_stop_expl = SPACE " stpox-sortf Sort string
* expl_docs_only_once = 'X' " bapi_doc_aux-flag Document management indicator
* stop_on_first_error = SPACE " bapi_doc_aux-flag Document Management Indicator
IMPORTING
return = " bapiret2 Return parameter
newversion = " bapi_doc_aux-docversion Document version
TABLES
docstructure = " stpox BOM Items (Extended for List Displays)
* changedversions = " tchg_vers Table for Transferring Changed Document Versions
* statuslist = " tstate_order Sequence of Status Check
* documentdata = " bapi_doc_draw2 BAPIS DMS: document data
* objectlinks = " bapi_doc_drad_keys BAPIS DMS: document data
* documentdescriptions = " bapi_doc_drat_keys BAPIS DMS: document data
* longtexts = " bapi_doc_text_keys BAPIS DMS: document data
* statuslog = " bapi_doc_drap_keys BAPIS DMS: document data
* documentfiles = " bapi_doc_files2_keys BAPIS DMS: document data
* components = " bapi_doc_comp_keys BAPIS DMS: document data
* all_returns = " bapiret2 Return Parameters
* characteristicvalues = " bapi_char_values_keys BAPI Structure for Characteristic Value Assignment (Docs)
* classallocations = " bapi_class_allocation_keys BAPI Structure for the Assignment of Classes to Several Objects
* documentstructures = " bapi_doc_structure_keys BAPIs DMS: Structure Data for Several Documents
* whereusedlists = " bapi_doc_structure_keys BAPIs DMS: Structure Data for Several Documents
. " BAPI_DOCUMENT_GETLATEST2
And also check this link..
Send original document from DMS as mail attachment
Hope this will help you..
Regards,
Jhings -
Document Number generation as per the client requirment
Hi,
I would like to generate the document no as per our client's document numbering logic. This is not available in standard.
In additional data tab am collecting information from user (Characteristics values) to generate document number.
E.G.
I have 2 characteristics
1. Part Type:
Values: A - Type 1
B - Type 2
2. Part Code:
Values: 01- Part 1
02 - Part 2
03 - Part 3
When am creating document am selecting Part Type = A & Part code = 02 so my document number is A-02. ("-" : constant).
I am planning to use BADI "DOCUMENT_MAIN01" - method "ASSIGN_NUMBER".
In this method how can i get the characteristics values which filled user on screen ? Is there any Function Module for that ?
I tried Function Module "CTMS_DDB_CLOSE" but this is not released also this is not working in Easy DMS.
Is there any other way i can take i/p from user to generate document number ?
Regards,
Sunny
Edited by: Sunny on Sep 25, 2008 9:09 PMHi Sunny,
An experienced ABAPer can capture the required information from the sub screen(additional data) number (4000) and the subscreen program (SAPLCTMS). This data can be used in the method of the BADI.
Regards,
T T Subudhi -
Material Document number generation
Hi,
The transaction GI, Trsfr Posting, Other Goods Movement is clubed to a wide category of Trans./Event Type(WA).So all the three documents has been generated under a single number range.
Still further based on certain specific mvt.types(transactions) can i segregate the number generation to identify the transactions uniquely.
Regards,
Milton.IHi
The number range is generated for the trans/event type. One cannot have number range for specific movement type.
Rgds
SVJ -
Bill document & print document number disapear from installation screen.
Hi ,
After archiving the following objects bill document & invoice document disapear from installation screen.
Print line item: ISU_PRDOCL
Print header: ISU_PRDOCH
Bill line item: ISU_BILLZ
Bill header: ISU_BILL
To get the details of those document we need the documnet number.
Is there any SAP note for this scenario (issue) or any work around/transaction from where we can get the document number.
If there will need any Z development from where we can get that document ..please suggest.
Regards,
SudipThanks Ravi,
But my concern is that wher can we get the document number. If we have the doc number then only we can get the details from EA22 & Ea40 transaction.
In certain scenario if multiple document is archived then it is bit difficult to find the doc number.
Is there any stnadrd SAP transaction or development where we can get the doc number. (in FPL9 this provision is alredy there).
Regards,
Sudip -
MM Document number and FI document number is a single table
Dear Friends,
Could you please let me know the table where both MM document number and FI document number will be available. I checked in BKPF and it is only updating FI document number and not MM document number and in MKPF it is only updating MM doc number and not FI document number.
Also let me know if there is any report/tcode/program available to view this at one place itself.
Regards,
Dwarak.hi
i dont think you can view both table in one screen.
in T-CODE:SE16N you can see one by one table.
Regards
ramana -
The Candidate mobile number disappeared from ADR2 table
Hi,
I have an observation that, when candidate gets registered in the system with all the basic details like First name, last name, Email ID and Mobile number. The details get stored in respective tables. The mobile number of the candidate gets stored in ADR2 table. In ADR2 table requires ADRCOMM number which we get from BUT000. Till the candidate was not hired the ADRCOMM Number was there in BUT000 table but as soon as the hiring has been done for that candidate the ADRCOMM number got vanished from BUT000.
Kindly let me know that after hiring is that mobile number getting stored in any other table? Or what is the reason for mobile number to get disappeared?
Regards,
Sarika MansukhHi Nicole,
Thanks for your response. In E-recruitment the candidate gets register in the system then gives the confirmation and then go to My profile and fills mobile number becoz we have made customization on my profile page that the mobile number is the mandatory field. However, i want to display that mobile number in one of my applicant details report.
Therefore, I have given logic to fetch mobile number from ADR2 table. But ADR2 table needs ADDRCOMM number which we get from BUT000 table. For registered candidates the ADDRCOMM numbers get created in BUT000 but as soon as hiring done that number gets diapered from the table.
Can you pls let me know that after hiring the mobile number gets stored in other table?
Or
What is the reason to ADDRCOMM number to get disappeared from BUT000 table.
Regards,
Sarika Mansukh -
How to get input text values from adf table - Urgent
Hi Friends,
This is my requirement. I designed customized master - detail - detail page. I customized the page in below format.
1. Master Data Field (Input text,etc) .
2. Detail in table format ( Rows are mapped to child table) and i given two buttons for to create row and delete row. I designed the table based on the example provided in forum for to create customized table. The input text component is mapped to the rows.
Now i want to retrieve all the data's entered in the rows. The table is mapped to child table. When i read the values from the table its showing null.
If any one faced this problem and fixed it, please send me the solution.
Thanks & Regards
VBDid you look into the valueChangeEvent?
It has oldValue and newValue attributes.
public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
Object oldVal = valueChangeEvent.getOldValue();
Object newVal = valueChangeEvent.getNewValue();
// check if you see what you are looking for.....
getSelectedRow();
SaveMaterial(material);
}Timo -
hi all
for a user defined form,i created a field as document number,as the forms loads doc number is creating. Once the form mode changed to update mode,and now i m pressing (Ctrl+A ) or menu UID 1282 to change the mode into add mode. but i m not able handle this menu event by code. more clearly i m using the following code
if pval.menuUid="1282" then
objForm.objmain.objApplication.Forms.getform("formtype",0)
me.getDocnum()
end if
Actually i need to generate the doc number at the time of form mode changed into add mode also
Edited by: ajith464 on Aug 31, 2010 7:32 AMHi
Did you go through the B1DE document.
In that you can find detailed information about how to create addons using B1De.
First create required UDT and UDF's for your addon and register it through object registration wizard.For creating form you have 2 option create form manually or using form generator to create form automatically.Form generator will create form in xml format you easy change the extension to srf.Then create addon project in visual studio , choose the connection type second one (sigle side ) . if you created the udt and udf then you can avoid next step. Choose a menu location for you addon give the required fields such as menu name description and choose menu type string. After the menu is created you have to attach the new form to that menu item for that right click on that menu and select attach form browse the location of your newly created form you can also add menu events in this step.To add listener again right click on the menu and select add listener you can add onaftermenuclick and onbeforemenuclick( there is a check box to differentiate these two events). Then press next , in this window you can find that your form name is listed in the left side ,expand it select the item for adding listener.
for eg take the case of OK button its unique id is 1 we can add various listener to it such as onBeforeItemPress , On AfterItemPress, onBeforeItemClick and afterItemClick etc that up to your requirement. Click next here you can add form events listeners such as formDataAdd , formDataUpdate etc . complete the steps and create the project
sorry for my english
I will also send you some samples
Regards
Arun -
XML generation from two tables
Hi,
I need to write an Oracle SP(Id as input) create an XML strucutre out of the records fetched from two tables. There is no Fk relation between the tables.
Table A ---> has one record per interface per id
Table B---> has multiple records per interface per id
Table A
1) Id
2)ErrorCount
3)SuccessCount
4)Total
5)InterfaceName
Table B
1)Id
2)InterfaceName
3)ErrorDetail
4)ErrorMessage
XML Strucutre
<Report>
<TableA>
<Id>
<InterfaceName>
<Success/>
<Total/>
</InterfaceName>
</Id>
</TableA>
<TableB>
<Id>
<InterfaceName>
<ErrorDetail/>
<ErrorMesage/>
</InterfaceName>
</Id>
</TableB>
</Report>
Thanks,
Is
Edited by: Is916 on Sep 16, 2009 2:27 AMThere are several ways to general XML.
Here's just one...
with A as (select 1 as id, 2 as errorcount, 4 as successcount, 6 as total, 'Bob' as interfacename from dual union all
select 2, 1, 4, 5, 'Fred' from dual)
,B as (select 1 as id, 'Bob' as interfacename, 'Error 1' as errordetail, 'Ouch that hurt' as errormessage from dual union all
select 1 as id, 'Bob', 'Error 2', 'Why did this happen' from dual union all
select 2, 'Fred', 'Warning', 'Why worry about it' from dual)
select xmlelement("Report",
A.xml, B.xml
) as xml
from (select xmlelement("TableA",
xmlelement("Id",
xmlelement("Success", successcount),
xmlelement("Total", total)
) as xml
from A where A.id = 1) A
,(select xmlagg(xmlelement("TableB",
xmlelement("Id",
xmlelement("InterfaceName",
xmlelement("ErrorDetail", errordetail),
xmlelement("ErrorMessage", errormessage)
) as xml
from B where B.id = 1) B
<Report>
<TableA>
<Id>
<Success>4</Success>
<Total>6</Total>
</Id>
</TableA>
<TableB>
<Id>
<InterfaceName>
<ErrorDetail>Error 1</ErrorDetail>
<ErrorMessage>Ouch that hurt</ErrorMessage>
</InterfaceName>
</Id>
</TableB>
<TableB>
<Id>
<InterfaceName>
<ErrorDetail>Error2</ErrorDetail>
<ErrorMessage>Why did this happen</ErrorMessage>
</InterfaceName>
</Id>
</TableB>
</Report> -
Document number generation w. ref to Part no.
Hi Gurus,
We have created a template to upload Cutover data in CV01N with the following series.
Document
Document Type
Document Part
Document version
Description
1
DWG
000
00
TEST TEST TEST
2
DWG
000
00
TEST TEST TEST
3
DWG
000
00
TEST TEST TEST
3
DWG
001
00
TEST TEST TEST
3
DWG
002
00
TEST TEST TEST
4
DWG
000
00
TEST TEST TEST
when the input data is taken from Document Field i.e 1-4, system is generating an internal number as following:
PS-2014-DWG-802864
PS-2014-DWG-802863
PS-2014-DWG-802862
PS-2014-DWG-802861
As the system have to check the Input which we are giving in the excel sheet (Document) and generating the new number also validate the part number. If the Document Part number has a series like 000,001,002 it should not generate a new number, but should take the same system generated number and proceed like the following.
Document
Document Type
Document Part
Document version
Description
PS-2014-DWG-802863
DWG
000
00
TEST TEST TEST
PS-2014-DWG-802863
DWG
001
00
TEST TEST TEST
PS-2014-DWG-802863
DWG
002
00
TEST TEST TEST
Please let me know if there is any enhancement / solution to achieve this scenario.
I appreciate for your help.
Regards
NaveenHi Naveen,
For data with document part & version as 000 & 00, you provide only the document type as input but in case of document part with 001, 002... you need to provide DIR number, document type, document part as inputs in your Z program.
First, you need to have separate sheets for DIR's without document part & version and upload it for creating the DIR numbers. Then update new created DIR numbers in the second sheet where document part & versions are maintained and upload the same.
You can have one Z program which checks document part & version (If it is 000 & 00), create the internal numbers and if document part & version is maintained, then take DIR number maintained in the sheet as input of DIR creation
Regards,
Ravi -
REG: Tracking Number Generation from Handling Unit Number
Hi All,
I have a scenario where I need to generate the Tracking numbers from the handling Unit Numbers.
For a Delivery : Handling Unit entry exists but there is no entry for the Tracking Number.
I am basically a ABAPPER and now need the Steps/Logic to generate the tracking Number.
Any sorts of help/hints shall be appreciated.
Steps to generate the Tracking Number using the Handling Unit Number.
Thanks and Regards
Srikanth.PHi ,
Check out the handling unit item table VEPO. You got storage location(LGORT) in it.
Reward points if it was useful.
Regards,
Abhishek
Maybe you are looking for
-
BB app world is in my applications so it is downloaded but i cant actually open it be cause it is not in my downloads help
-
Procurement through Purchasing Orgs in different company codes
Dear SRM Experts, System Info SRM 5.0 and ECC 6.0 This situation applies to a multinational company with a different company code for each country. And there is one purchasing organization per company code. We need to configure a scenario in SRM 5.0,
-
How to "unchain" a cell reference?
Hi! I try to do the following: The field A2 is linked to the upper table B2 to get the worth that is in it A3 to A4 are the same. The fields from C1 to E4 are linked to another table (not visible) by a query depending on the worth in B2. If i sort no
-
i am adding some animations to keynote. i would like the animations to come from the left, or the top. here is my problem : i can't seem to get the slide to "detach" from the upper-left side of the screen, when i am zoomed out. i have looked everywhe
-
Hi, If I want to receive more items on an exisiting batch I get the system message that the batch already exists. Is it possible to getrid of this message. Thanks Ad