COPA user exit (COPA0001)
Hi,
I have a requirement where i need to populate the date field in COPA( called the reporting date) with the posting date of Invoice when the billing document is created.
But the problem what i have is the userexit doesn't get the billing document number and the date when it is triggered duing creation of Invoice(VF01) and this user exit depends on the config we do in KEDR transaction.
Now only those values mentioned as source field in the KEDR enhancement(Config) will be populated in the userexit, rest all values are blank.
But unfortunately the source field in KEDR does not have any field for Billing doument number so it doesn't get populated.
Thanks for any help or inputs.
Thanks,
Babu
Hi Krish,
Check this note: 134889 and 185826.
Reddy
Similar Messages
-
Hi,
I am working an issue and was hoping to get confirmation I'm on the right track or some advise otherwise.
We are executing KE27 at month end. In certain cases the COPA doc created holds the revaluation only in value field vvcml. There is no cost component split because the material is purposely assigned a price determination of 2. Is there an exit that is called during KE27 that I can use to copy the amount in vvcml to a cost component value field so the PA doc created by KE27 holds a revaluation amount in multiple value fields? Can I use enhancement COPA0002 / function module EXIT_SAPLKEAB_001 to accomplish this? Would it also be necessary to add a step in my valuation strategy to assign the user exit via KE4U? I tried enhancement COPA0005 but seems code added to include ZXKKEU08 was not called during execution of KE27. Thanks.Hi
Go to KE4R and see if you have assigned one single Val Field against Record Type 02??
Ideally, you can assign a different VF per cost component at this place.. Does this help you?
br, Ajay M -
We are currently on MySAP 2004, and have an issue with COPA as it relates to credit memos and returns. Based on the document category (VBRK-VBTYP) and the billing type (VBRP-FKTYP) the volume should be either zeroed out or multiplied times -1. I have gone through all the user-exits that I can find, and EXIT_SAPLKEAB_001 looks like the closest one to use. My problem is that I cannot find these fields available.
In debugging through the code I see KOMK-VBTYP, which I could use, but when it gets to the user-exit, it is no longer available.
I know I can change it in EXIT_SAPLRSAP_001 when the COPA data is extracted into BW, but if I do that, then the source data(COPA) will not match the target data(BW).
Any suggestions?
Thanks,
Bill McClure
Message was edited by: Bill McClure
Mickey BrownHi,
Use the Standard Enhancement COPA0005 which has EXIT_SAPLKEII_001
EXIT_SAPLKEII_002.
We used the Z* tables for some flexibility rather than defining the complete list of Order types and Billing Types.
You could go ahead without using the Ztable if you hard code the values in this exit.
Let me know if you need additional info.
Thanks,
Praveen -
COPA: Transaction KE26 - User Exits
Hi,
I need to activate the SAP Enhancements COPA002 for this force hand in the transaction KE26.
Is there any way to do this?
Best regards and thanksHello guys,
I need to modify values store in COPA. When a bill document is saved (SD), COPA tables are store, but some values are incorrect for my business, and I can't configure this.
So I think I can do somethig with COPA user exits.
Which user exit can I use to modify data (value fields) just before they are inserted in COPA table ce1xxxx?? -
User exit during Sales order settlement to COPA (through VA88)
Hi All
I need uergent help.
We are settling SO to COPA through VA88. We are looking for some user exit/mehtod to change soem value fields and quantity feilds in COPA document.
Thanks
NeerajHi,
In your valuation strategy (tcode KE4U) you should specify that user exit will be used for record type C.
The user exit in this case is COPA0002.
regards
Waman -
User-exit during settlement of PM orders to COPA
HI,
We have a situation where a plant maintenance order type is sometimes charged to a customer. In those cases, the costs are sent to SD using a DIP profile, the customer invoiced. with the PM orders as the cost object for the revenue posting. At the end of the month, the PM order is settled to COPA. But I also need to duplicate the entry on the cost centre....
So I need two user-exits, one of which I have.
I need a user-exit to override the automatically derived settlement rule, so that I can put in a PSG as settlement receiver.
Then somewhere, either at the time of the billing doc release to accounting, but preferably at the time of the settlement posting into COPA, I need a user-exit where I can quickly post an FI document.
COPA0002, which we use for something similar in postings from SD to COPA, seems not to be triggered during settlement postings. The same is true of the Fm's for COPA0005.
Does anybody know of a user-exit that gets triggered during settlemnt to COAP from orders?Hi
Your settlement rule says "Settle to Cost Center" only.... I dont think any user exit can help in this case, if you want to settle occasioanlly to 2 cost objects
Try with these options
Option A
1. Remove the 100% validation tick in the settlement profile...
2. Maintain 2 settlement rules... i.e. One with Cost center and another with PSG... If any warning comes, ignore it
3. Execute settlement now
Option B
1. Maintain settlement rule with PSG as settlement receiver
2. In the same Settlement rule, Menu GO TO > DETAILS and maintain Cost Center also....
3. Now execute settlement...
Option C
1. Maintain settlement rule with PSG as settlement receiver
2. In the same Settlement rule, populate Cost Center also as a Valid Characteristic
3. Now execute settlement...
BR,Ajay M -
Currency Conversion for billing doc and after user exits in COPA
Hello Friends,
Need your view on this issue:
1. Company codes currency and Operating currency is different., Costing Based CO-PA.
2. Value filed "Gross Sales" get posted via Billing doc. In case of correction billing or re-posting (after reversal of original one) of billing doc value
field "Gross sales" get posted based on exchange rate of original (very first) posted document because system is updating "Translation date"
in table BKPF from very first document posted and not taking current date as a translation date. SAP standard program is reading "Translation date" from BKPF to chose exchange rate and valuating "Gross Sales" on that ex.rate.
3. Some user exits in COPA valuation to populate some values for other value field (Example - Gross Sales value should populate in value field
"Sales ASP"). After valuation in exits, SAP standard program is re-valuating value fields value (program statement is : perform currency conversion for fields that were changed in exit ) and for this valuation system is taking posting date for exchange rate.
Due to above logic company code currency value is different in Gross Sales and Sales ASP.
Requirement is : Sales ASP value should be same as Gross Sales.
Can you please share your thought to find the solution.
Thanks
RaviCheck if the currency key and the unit of measurement are filled in (these will be the reference fields specified in the field definition of the structure at the database level).
-
Hello guys,
When an invoice is created (VF01) COPA table ce1xxxx is update, but for certain billing document, alues are incorrect. I cant correct this in IMG so I guess I can use a user exit.
Whichh user exit should I use to change values to be inserted in ce1xxxx just before the insert actually happens, so I could modify values to the correct ones.As it is a standard program, why are you not checking a note?
Check this note: 134889 and 185826.
Reddy
Edited by: V.V.Reddy on May 7, 2010 9:27 AM -
When posting a document to COPA, I want to swap the value of one of the value field with another value field.
1. Is it possible?
2. Do we have a user exit for the same?
I tried COPA0002 but somehow when I create my billing document, control is not coming to that user exit at all.COPA0002 need to be activated from transaction KE4U, setting the user exit field to U01
-
User Exit to derive characterstics values of COPA
Hi
I Am posting an FI document using the standard program rfbibl00 or through FB01.
I have to post data to the PA segements too .
But the problem is that i need to derive the value of Brand based upon the value to Profit centre.
Can you help if ther is any user exit hat will be triggered where i can put in this code to derive the brand.
Thanks
NikhilHi,
The follwoing user exits are available:
Exit Name Description
F050S001 FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
F050S002 FIDCC1: Change IDoc/do not send
F050S003 FIDCC2: Change IDoc/do not send
F050S004 FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
F050S005 FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
F050S006 FI Outgoing IDoc: Reset Clearing in FI Document
F050S007 FIDCCH Outbound: Influence on IDoc for Document Change
F180A001 Balance Sheet Adjustment
FARC0002 Additional Checks for Archiving MM Vendor Master Data
RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
RFEPOS00 Line item display: Checking of selection conditions
RFKORIEX Automatic correspondence
SAPLF051 Workflow for FI (pre-capture, release for payment)
regards
Aveek -
Dummy code for user exit in COPA
Hi,
Can anybody provide me with a dummy code for the above, the requirement is as under ;
While running profitability analysis report the system is valuating production and material cost even
against sales order which are purely rate variation debit notes. The valuation for production and material
cost in such cases should be nil.The rate variation sales orders have document type either as VI or VH
For this the relevant user exit is COPA0002 and the component is "EXIT_SAPLKEAB_004". What
source code do we have to write in the user exit to fulfill the above requirement and how do we activate
it?
Regards
Milind NairUser Exit is EXIT_SAPMV45A_005. Go to CMod, create a new project , under enhancement give V45A0004. In ZXVVAU11 ,
data: WA_VBAP TYPE VBAP,
lv_matnr type matnr,
lv_matnr1 type matnr.
sort t_vbap by matnr.
IF sy-tcode = 'VA01'
AND ( sy-ucomm = 'SICH' ) .
loop at t_vbap INTO WA_VBAP.
lv_matnr = t_vbap-matnr.
if lv_matnr = lv_matnr1.
message 'Material number duplicated ' with type 'E'. (Pass the material number as parameter in message, so user can know which material number got ).
else.
continue.
endif.
lv_matnr1 = lv_matnr.
clear lv_matnr,WA_VBAP.
endloop.
endif.
Message was edited by:
DEBOPRIYO MALLICK -
User exit ZXPADU02 - evaluating SY-UCOMM
Hello everyone,
I am trying to display an error message whenever someone tries to create a new work schedule rule (P0007-SCHKZ) in infotype 7. However, the error message should just come up when the user is trying to save his data.
I am using user exit ZXPADU02 for this purpose. My problem is that SY-UCOMM does not seem to hold reliable data in this user exit, and SSCRFIELDS does not seem to be supported at all.
My code looks like this (only the relevant code snippet in ZXPADU02):
CASE INNNN-INFTY.
WHEN '0007'.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING PRELP = INNNN
IMPORTING PNNNN = P0007.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING PRELP = PSAVE
IMPORTING PNNNN = P0007_ALT.
IF P0007_ALT-SCHKZ <> P0007-SCHKZ
AND IPSYST-MASSN IS INITIAL " do not warn within an info group of a personnel action
AND SY-UCOMM = 'UPD'. " only warn when saving the data -> problem here <-
MESSAGE 'Do not change IT7 directly or else.' TYPE 'I' DISPLAY LIKE 'E'.
SHOW_DATA_AGAIN = 'X'.
ENDIF.
At first glance, the above works nicely. But this is what happens when I test more thoroughly:
I create a new period in IT 7, enter a P0007-SCHKZ other than the one that was previously valid, press F11. Some warnings appear (for different reasons), which I dismiss using the Enter key. Afterwards, the above code fires, the error message is being displayed, and I am thrown back into the data screen. So far, so good.
Now I simply alter the value in the field "Weekly hours" (P0007-WOSTD) and press Enter (!). Again a series of warnings appear, including one that a dataset is going to be deleted (seeing that an IT 7-period with just the same date range already exists). I confirm that with Enter, and the data is being saved. The above code does not fire because I have only pressed Enter - but the data is being saved anyway!
Looks like a pretty erroneous behavior on the side of the SAP system. The question is whether I have a chance to do something about it in the code.Mihir Nagar wrote:
Dear Petersen,
Your IF condition seems ok. I doubt on the message statement. Can you replace your message statement with type E.
MESSAGE 'Do not change IT7 directly or else.' TYPE 'E'.
ENDIF.
Hope this works.
Regards,
Mihir.
I did not expect this to work, because normally you use type 'E'-messages only in certain PAI-environments, but it does the job, thank you!
make use of field IOPER of the structure PSYST to check on the infotype actions INS, MOD, COP, DEL...
In this particular case I did not care, so I did not check that. IT 7 should only be maintained through personnel actions in our case.
Next you can check with sy-ucomm field the different between "enter" and "save". With "save" sy-ucomm will be 'UPD'.
That is what I did, but as I described, there was a situation when SY-UCOMM is SPACE, but the system saved anyway due to a prior save attempt. -
User exit or BADI for recruitment
Hi,
I am new to HCM, can you give me user exit or badi for recruitment.
Requirement - i have developed an infotype which i am updating through BSP, while the custom infotype is updated it should simultaneously update some of my Z tables. Hoping for positve replies earliest.
Thanks in advance:-
SantoshHi,
<b>Infotype</b>The data fields of HR master data, time management and recruitment are grouped logically into information types or infotypes for short.
Examples of infotypes are "Family/Related Person", "Organizational Assignment, "Basic Pay".
The following naming conventions apply to infotypes:
Infotypes 0000 to 0999 are used for HR master data
and sometimes for applicant data
Infotypes 1000 - 1999 for organizational management
Infotypes 2000 - 2999 for time data
Infotypes 4000 - 4999 for applicant data
Infotypes 9000 - 9999 for customers
<b>Function character of step</b>
This controls for which types of processing (create, change and/or delete a data record) a dynamic action should be carried out.
The processing type is indicated by a two-digit numeric value. These values can be added up; in other words, you can enter several processing types for each infotype, subtype or field. A dynamic action can also be carried out independent of the current processing type.
00 for Independent of the current function carried out
02 for Change
04 for Create
06 for Change and create
08 for Delete
10 for Change and delete
12 for Create and delete
Examples
If you enter 06, an action is carried out if the specified infotype was created or changed.
If you enter 00, an action is carried out irrespective of whether the specified infotype was created, changed or deleted.
<b>Variable function part</b>
The variable function part, which depends on the indicator for step, can have the following meaning:
<b>P - Plausibility checks</b>
You can enter values for specific infotype fields. Field names must be entered in full. Literals and constants can serve as comparison values. These must be enclosed by inverted commas. Variables can also be used.
The old value of a field can be used for comparison; the field name must be preceded by PSAVE-.
If fields of other infotypes are used for comparison, these must be stored in the module pool of the current infotype.
The following comparison operators are supported:
= equal to,
< less than,
<= less than or equal to,
> greater than
>= greater than or equal to and
<> not equal to.
Consecutive checks must be linked by a logical AND. Logical OR links must also be indicated by a /X.
Note:
Note that all checks with OR links must have a /X.
If the result of the comparison operation is not "true", then the following commands (I, F, W etc.) are skipped over until a field is reached or a new comparison operation takes place.
Examples
Infotype Field ..... Ind. Variable function part
0007 STAT3 P P0007-STAT3='0'
0007 STAT3 P PSAVE-STAT3='1'
The step is taken if the value in the P0007-STAT3 field changes from 1 to 0.
0007 P P0013-KLKZ1<>'0'/X
0007 P P0013-ALVKZ<>'0'/X
0007 P P0013-RVKZ1<>'0'/X
0007 P P0013-RVNUM=SPACE
The first three conditions are linked by an OR; at least one of these conditions must be met. Condition 4 must always be met.
The step is taken if the following holds true:
P0013-KVKZ1 not equal to 0 or P0013-ALVKZ not equal to 0 or P0013-RVKZ1 not equal to 0, and P0013-RVNUM empty.
<b>I - Maintain infotype record</b>
Enter the step, infotype, subtype, object ID, start and end dates of the record and an indicator which defines whether the step is to be run in the background. The possible actions are INS, COP, MOD, and DEL.
Use commas to separate selection criteria just like the separator in the matchcode. If an entry is missing, the system inserts a comma.
Separate the indicator for suppressing dialog from other entries by a slash D (/D).
Constants, such as those for subtypes, are not enclosed in inverted commas.
Variable entries are also permitted. Fields containing such values must be put in brackets.
Examples:
Infotype Field .... Ind. Variable function part
.... I INS,19,01/D
Step: Create a Dates record, subtype 01, run in the background
.... I DEL,14,M559
Step: Delete Rec. Payments/Deds. record with subtype (wage type) M559.
0007 .... I INS,8,,,(P0007-BEGDA),(P0007-ENDDA)
Step: Create a Basic Pay record (0008) without subtype and object ID. The start and end dates are the same as those in the current Planned Working Time record (0007); specify these two fields only if they are filled because the dynamic action was triggered by this infotype.
<b>W - Default values for new record</b>
Literals or variables are used as default values.
Set the defaults for the infotype, subtype, object ID, start and end dates using an I step and not a W step.
Do not set defaults for Q fields of an infotype because the values for these fields are derived from the corresponding P fields.
Examples
Infotype Subtype ..... FC Ind. Variable function part
0021 2 04 I INS,0015,M430
0021 2 04 W P0015-BETRG='10000'
When a Family/Related Person record (0021) record with subtype 2 (child) is created, an Additional Payments record (0015) with a default amount of 100.00 is created.
<b>V - Cross-reference to another step</b>
Here, you can combine fields to groups. The variable function part contains the value in the field which follows the "field" column. Steps which are specified only for the following field are also triggered for each of the other fields.
Examples
Infotype Field ..... FC Ind. Variable function part
0016 PRBZH 06 V PRBZT
0016 PRBZT 06 I DEL,0019,01/D
Infotype 0019, subtype 01 is deleted in the background when the field PRBZT or PRBZH in infotype 0016 is changed or created (function code 06).
The following entries are equivalent:
0016 PRBZH 06 I DEL,0019,01/D
0016 PRBZT 06 I DEL,0019,01/D
<b>F - Call a routine</b>
You can call internal (module pool) as well as external routines.
If you call external routines, type the program name in brackets after the routine name. Do not specify 'using' parameters. When calling an external routine, all data must be declared in a common part. You can use the fields of structure RP50D to return values from the routine. These are not used in the standard system and can only be populated via the routine and then can be used for defaults (W-Commands).
This allows customer-specific routines to be formulated with all the above steps.
Example 1:
Infotype Field ..... Ind. Var.function part
0016 PRBZT F PROBATION
0016 PRBZT I INS,19,01
0016 PRBZT W P0019-VTRMN=PRBEND
Module pool MP001600 contains the PROBATION routine. This routine uses the entries in the fields P0016-PRBZT and P0016-PRBEH to determine the end of the probation period which it stores in the field PRBEND.
The system creates a new 'Dates' record with the reminder date = PRBEND.
Example 2:
Infotyp ..... Ind. Var. function part
0001 F GET_DATE(ZPUDYN01)
0001 I INS,19,01
0001 W P0019-VTRMN=RP50D-DATE1
The GET_DATE routine in program ZPUDYN01 calculates a date and enters this date in the RP50D-DATE1 field via "TABLES RP50D" in ZPUDYN01. This date can be user-defined in GET_DATE: if necessary, user-defined infotypes can be read afterwards.
<b>M - Send a mail</b>
Enter the name of the feature which defines the characteristics of the mail.
Example
Infotype Field ..... Ind. Var.function part
0001 SACHP M M0001
A mail is sent when the field SACHP is changed. The characteristics of the mail are defined in feature M0001.
In the standard system, feature M0001 is provided as a model. The documentation on feature M0001 explains how to define the characteristics of a mail.
<b>ADDITIONAL HINTS</b>
If you use a date as a constant, enter it as YYYYMMDD (YYYY=year, MM=month, DD=day).
The table strings T001P, T503 and PSPAR are filled with the values which are valid on the record start date.
The old values of the infotype are stored in the field string PSAVE. The structure of this string is the same as the Pnnnn structure (nnnn=infotype). The structure is filled with (valid) values only when the delete, change and create functions are used.
Please read Create dynamic actions in the Implementation Guide.
Regards
Bernd -
User exit to copy Manual pricing conditions with in sales documents
Hi all,
I have a situation where i have to copy the manual pricing conditions from inquiry to quotation.
Problem: From VA21 when I try to do the same using the tab "create with reference" the document is being copied but the manually set pricing condition in the inquiry is not being copied into quotation. This is because in the copy controls the pricing type is set to 'B' which means "carry out new pricing". I can change it to 'C' or 'D' so that it copies manual pricing but i am not allowed to do so because other sales orgs in the company has a problem if i do so. Only our perticular sales org needs this config. I cannot even create another item catogory specific to this plant because it is against the rules of the company. So I am looking for a user exit in which i can change this pricing type during runtime so that i can plug in some code specific to this sales org to copy manual pricing. I have found one from the SAP note 24832 (MV61AFZA). It doesn't work as i think its obsolte. Can anyone suggest me a better way of solving this issue. Any quick response is appreciated.
Thanks,
Giridhar.Hi
The following EXITS may help you
Exit Name Description
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
V45A0001 Determine alternative materials for product selection
Regards
PRabhu -
User exit EXIT_SAPLL03T_002 and jobs
Hi everybody,
I have a problem with user exit EXIT_SAPLL03T_002 and trx LT12, i put code (the code is in the end) in the user exit in order to update the field QNAME from the standar table LTAP, the sentences for the update are in a job.
The problem is when a run the LT12, put the order and press enter the trx finish normally, but when i see the jobs resumen (SM37) there isnt any job.
Thank you for your help, see you.
INCLUDE ZXLTOU02 *
DATA:
WJ_JTANUM LIKE LTAP-TANUM,
WJ_LGNUM LIKE LTAP-LGNUM,
WJ_WERKS LIKE LTAP-WERKS,
WJ_USER LIKE SY-UNAME,
Parametros para el Job
l_numero LIKE tbtcjob-jobcount, "ID de un job de fondo
l_fecha LIKE tbtcjob-laststrtdt, "Fecha de ejecución más tardía
l_hora LIKE tbtcjob-laststrttm, "Ultima hora de ejecución para
l_jobname LIKE tbtco-jobname VALUE 'JOB_RF',
W_USER LIKE SY-UNAME,
W_HORA LIKE SY-UZEIT,
W_DIA LIKE SY-DATUM.
GET PARAMETER ID 'mb_usuario' FIELD W_USER.
Solo lo realiza para la transaccion LM05 y LM07
y si es por logueo No SAP
***ANTIGUO
*IF ( SY-TCODE EQ 'LM05' OR
SY-TCODE EQ 'LM07' OR SY-TCODE EQ 'LM03' OR
SY-TCODE EQ 'LM04') AND ( W_USER NE '' ).
**********ACTUALIZADO 07/02*********
IF ( SY-TCODE EQ 'LM05' OR
SY-TCODE EQ 'LM07' OR SY-TCODE EQ 'LM03' OR
SY-TCODE EQ 'LM04' OR SY-TCODE EQ 'LT12' ) AND ( W_USER NE '' ).
ojo
UPDATE ZTMB_USERCOLA
SET STATU = ' ' DOCNUM = ' '
WHERE
BNAME = W_USER.
GET PARAMETER ID 'mb_hora' FIELD W_HORA.
GET PARAMETER ID 'mb_dia' FIELD W_DIA.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = l_jobname
IMPORTING
jobcount = l_numero
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
SUBMIT ZUPDATE_LTAP
AND RETURN
VIA JOB l_jobname NUMBER l_numero
WITH WJ_TANUM = T_LTAP_VB-TANUM
WITH WJ_LGNUM = T_LTAP_VB-LGNUM
WITH WJ_WERKS = T_LTAP_VB-WERKS
WITH WJ_USER = W_USER.
Llama a la funcion para cerrar el Job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_numero
jobname = l_jobname
strtimmed = 'X' "Inicio inmediato
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
ENDIF.
REPORT ZUPDATE_LTAP .
PARAMETERS:
WJ_TANUM LIKE LTAP-TANUM, " Numero de OT
WJ_LGNUM LIKE LTAP-LGNUM, " Almacen
WJ_WERKS LIKE LTAP-WERKS, " Centro
WJ_USER LIKE SY-UNAME, " Usuario SAP
W_QNAME LIKE LTAP-QNAME.
data: w_actual, w_timeout type i.
Actualiza el campos de usuario
w_actual = '0'.
w_timeout = 0.
while w_actual = '0' and w_timeout < 300.
w_timeout = w_timeout + 1.
WAIT UP TO 7 SECONDS.
UPDATE LTAP
SET QNAME = WJ_USER ZZRF_BNAME = WJ_USER
WHERE
TANUM = WJ_TANUM
AND
LGNUM = WJ_LGNUM
AND
WERKS = WJ_WERKS.
AGREGANDO 4 ENERO
UPDATE ZTMB_USERCOLA
SET TPICKEO = SY-UZEIT FPICKEO = SY-DATUM
WHERE
LGNUM = WJ_LGNUM
AND
BNAME = WJ_USER.
AGREGANDO 4 ENERO
if sy-subrc = 0.
w_actual = '1'.
UPDATE LTAK SET ZZRF_BNAME = WJ_USER
WHERE TANUM = WJ_TANUM AND
LGNUM = WJ_LGNUM.
endif.
commit work.
endwhile.Hi,
Check the print parameters. Probably after execution you may be deleting the job.
You can change the print parameters during runtime.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
no_dialog = 'X'
user = sy-uname
IMPORTING
OUT_ARCHIVE_PARAMETERS =
out_parameters = params
valid = ws_valid.
IF ws_valid <> space.
params-pdest = 'LOCL'. "Destination
params-primm = ''. "Print Immediately
params-prnew = 'X'. "New Spool Request.
params-armod = '1'. "Print: Archiving Mode - Print Only
params-linct = 65. "Rows
params-linsz = 255. "Cols
params-paart = 'X_65_255'.
params-prrec = sy-uname. "User name
params-prsap = ''. "Print: SAP Cover Page
params-prunx = ''. "PRINT: Host spool cover page
params-prcop = '001'. "number of copies
SUBMIT zmib_fiber_link_background
WITH file = i_file_list-name
WITH rb1 = space
WITH rb2 = c_x
WITH p_launch = c_x
VIA JOB ws_c_session NUMBER ws_c_jobnum
EXPORTING LIST TO MEMORY
TO SAP-SPOOL
WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS params
AND RETURN.
endif.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = ws_c_jobnum
jobname = ws_c_session
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
Also check the sy-subrc after JOB_OPEN.
Regards
Subramanian
Maybe you are looking for
-
How do I transfer music from my ipod to the family pc & my sisters ipod?
My sister and I both have IPod touches and each have some songs that the other one wants. Is there anyway I can transfer songs from my iPod to hers and from hers to mine? I'd also like to add the songs to the family computer. Thanks.
-
Ipod Playing, But no Audio Output!
I have tried just about everytime to see if it was the song that was playing that caused it to have no audio, but no. i plugged in my headphones several times, tried to play the ipod through speakers everything. I have reset it several times, connect
-
PLEASE HELP!!! I had to re-load osx and iphoto 6. Before doing so I pulled my hard drive into an external drive so I would not loose any pics in i photo. When all was said and done everything came back except the last pics I loaded into I photo. I ha
-
Hi expert I have made mandatory Quality info Record and Vendor Info Record at the time of Purchase order Creation for all the Plant, now i need for few plant Quality info Record and Vendor Info Record should not be mandatory. Regard Nabil
-
Hi Gurus, I am running DAC, but my tasks SIL_PurchaseCostFact_full is taking more time to complete. I looked at the throughtput in the session workflow monitor stats its 146(rows/sec) for 200,000 records. The other env the throughput is higher 6699(r