Function Module to fetch Release Code for PReqs
Hi,
Is there any function module to get the current release code applicale by passing the requisition number?
Example : If we have 4 levels of approval, say A1,A2,A3 and A4, and I want to know with what release code shall I release the requisition.
If release has benn effected for the requisition with codes A1 and A2 and if I query with the function module what is the current release code applicable, then it should give A3 or atleast a result that A2 has been the last release code effected.
Also where is the release related info stored ? I mean which tables...
Not the release strategy related info but the release effected info.
Dont worry about points...
Hi
Pur requisition Release Codes are stored in <b>T161E</b> table
Release code is linked with Release strategy in <b>T161F</b> table
Link the code with Release strategy field in <b>EBAN</b> table
Also check the fun modules
MM_CHECK_RELEASE_CODE_EQUAL_KI
MM_CHECK_RELEASE_CODE_NOT_KI
ME_RELEASE_REQUISITION
BAPI_REQUISITION_RELEASE
Reward points if useful
Regards
Anji
Message was edited by:
Anji Reddy Vangala
Similar Messages
-
Function Module to Fetch data of Vendor for Inbound Delivery at runtime
Hi All,
I am new to EWM. I am using BADI /SCWM/EX_DLV_DET_PROCTYPE method CHANGE_PROCTYPE to change process type of the inbound delivery as per some logic from a custom table. However the parameter Vendor is not available in IS_ITEM during inbound delivery creation. Vendor is one of the key fields in my table.
Does anyone know any solution/function modules to fetch vendor data for the inbound delivery at runtime. I know the database tables to fetch vendor but this works only once the inbound delivery is saved.
Thanks and Regards,
Vanessa NoronhaHi All,
I am new to EWM. I am using BADI /SCWM/EX_DLV_DET_PROCTYPE method CHANGE_PROCTYPE to change process type of the inbound delivery as per some logic from a custom table. However the parameter Vendor is not available in IS_ITEM during inbound delivery creation. Vendor is one of the key fields in my table.
Does anyone know any solution/function modules to fetch vendor data for the inbound delivery at runtime. I know the database tables to fetch vendor but this works only once the inbound delivery is saved.
Thanks and Regards,
Vanessa Noronha -
Generic datasource by function module to fetch data from multiple tables?
I'm writing a function module to fetch price, for generic datasource.
At first, extract test is OK. But InfoPackage never stop when loading data to PSA in BW.
And I find the example codes:
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
WHERE CARRID IN L_R_CARRID AND
CONNID IN L_R_CONNID.
ENDIF. "First data package ?
* Fetch records into interface table.
* named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF.
There using Cursor to fetch data package by package, and raise exception NO_MORE_DATA to stop the loading process.
Now I fetch data from multiple tables, I don't think I can use Cursor.
Then How can I handle this?
Thanks a lot.Thanks
IF IT_999[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A999 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_999
WHERE
* A~KNUMH = IT_999-KNUMH AND
( ( A~KSCHL = 'ZPRC' AND VKORG = 'Z000' AND VTWEG = 'Z1' ) OR
( A~KSCHL = 'ZPRD' AND VKORG = 'A000' AND VTWEG = 'Y3' ) ) AND
* A~DATBI >= SY-DATUM AND
LOEVM_KO = ''.
SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A999 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_999
WHERE
* A~KNUMH = IT_999-KNUMH AND
A~KSCHL = 'ZPR3' AND A~VKORG = 'I000' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
IF IT_997[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A997 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_997
WHERE
* A~KNUMH = IT_997-KNUMH AND
A~KSCHL = 'ZPRA' AND VTWEG = 'Y1' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
IF IT_996[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A996 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_996
WHERE
* A~KNUMH = IT_996-KNUMH AND
A~KSCHL = 'ZPRB' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
SELECT MATNR "u7269u6599u53F7u7801
MEINH "u4ED3u50A8u5355u4F4Du7684u5907u7528u8BA1u91CFu5355u4F4D
UMREZ "u57FAu672Cu8BA1u91CFu5355u4F4Du8F6Cu6362u5206u5B50
UMREN "u8F6Cu6362u4E3Au57FAu672Cu8BA1u91CFu5355u4F4Du7684u5206u6BCD
FROM MARM
INTO CORRESPONDING FIELDS OF TABLE IT_MARM
FOR ALL ENTRIES IN TP_DATA
WHERE MATNR = TP_DATA-MATNR AND MEINH = TP_DATA-KMEIN.
LOOP AT TP_DATA.
IF TP_DATA-KPEIN NE 0.
TP_DATA-KBETR = TP_DATA-KBETR / TP_DATA-KPEIN.
TP_DATA-KHETR = TP_DATA-KHETR / TP_DATA-KPEIN.
ENDIF.
IF TP_DATA-KSCHL = 'ZPRA'.
* TP_DATA-MEINH = 'ZI'.
* TP_DATA-KSCHL = 'B4'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'CT'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPRB'.
* TP_DATA-KSCHL = 'L0'.
* TP_DATA-MEINH = 'ZI'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPRC' OR TP_DATA-KSCHL = 'ZPRD'.
* TP_DATA-MEINH = 'ZI'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'WZI'.
TP_DATA-KBETR = TP_DATA-KBETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPR3'.
* TP_DATA-KSCHL = 'B2'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ENDIF.
TP_DATA-MEINH = '01'.
MODIFY TP_DATA.
E_T_DATA-MATNR = TP_DATA-MATNR.
E_T_DATA-KSCHL = TP_DATA-KSCHL.
E_T_DATA-KHETR = TP_DATA-KHETR.
E_T_DATA-KBETR = TP_DATA-KBETR.
E_T_DATA-KMEIN = TP_DATA-KMEIN.
E_T_DATA-DATAB = TP_DATA-DATAB.
E_T_DATA-DATBI = TP_DATA-DATBI.
APPEND E_T_DATA.
CLEAR WA_MARM1.
CLEAR WA_MARM2.
ENDLOOP.
Edited by: Shen Peng on Oct 20, 2010 10:09 AM -
Function module to fetch pdf file from App. Server and print/email?
Hi all,
Is there any function module to fetch a PDF file from APPLICATION SERVER and print the PDF file or send it as an attachment in an email?
Please help..
Thanks in advance.
Sandeep.Hi Sandeep,
Is there any function module to fetch a PDF file from APPLICATION SERVER
1) As far as i know there are no FMs to read a file from App server, you can do the same using *OPEN/READ/CLOSE dataset ABAP statements - There are tons of examples for this on the net.
and print the PDF file or send it as an attachment in an email?
You can send the file read from the app server(by the suggested method above) and use CL_BCS to send it as an attachment.
Again there are many examples on the net on how to use CL_BCS for the same.
Regards,
Chen -
Function Module to fetch Partner Functions in PM Notification
Hi Expert,
I have one requirement to send mail to M2- Engineering Man in PM Notification after saving.
So I want to fetch all M2 (Engineering Man i.e. Partner Functions) from that Notification at runtime.
Right now I am writing the Logic in BADI "NOTIF_EVENT_POST" and I am not getting those M2: Engineering Man in this BADI.
If anyone know Function Module to fetch Partner Functions at runtime please let me know.
Thanks,
Jay.Hello,
Did you find any function module for updating the Partner address in the Notificaton
Regards,
sks. -
Functionality / modules currently available in MySAP for asset tracking.
Hi All,
We have a new requirement in the asset accounting. If any one have come accross can you let me know the feasibility and the process.
1.Functionality / modules currently available in MySAP for asset tracking.
2.Could MySAP support data input from other external devices e.g. scanner.
3.What kind of asset level info is stored in MySAP and how they are modified along the asset life cycle
Thanks nd Regards
Srihari BollaYes this is possible.
In the asset itself you have the fields Last inventory on and Include asset in inventory list
From SAP you can print barcodes (asset and asset sub number) that you can put on your assets TC S_ALR_87010137 - Bar Codes . There is a standard SAP script for this, but you can create your own one.
The date you want to use for your tracking you can get ot ouf the table ANLA
For all the barcode's reader there is software that can create a file. This file you upload with an LSMW in SAP that updates the field Last inventory on. -
Function module to determine the date for the nth weekday of the mth month
Hey folks,
Is there a function module which determines the date for the mth weekday of the nth month in the pth year.
For instance, if I input 2nd thursday of the 4th month in 2008, it should return me, 04/10/2008 (MM/DD/YYYY).
Thanks and Best Regards,
Puja.Hi Ravi,
Hadn't been able to work on this lately...You solution was quite close, but did not work for a few scenarios....I tweaked the logic a bit to take care of them as well...
So here goes the code:
================================================
DATA first_day_of_month TYPE datum.
DATA day TYPE p.
CONCATENATE year month '01' INTO first_day_of_month.
CALL FUNCTION 'DAY_IN_WEEK'
EXPORTING
datum = first_day_of_month
IMPORTING
wotnr = day.
DATA day_number TYPE numc2.
IF day = weekday.
IF recur = 1.
DATA ls_date(10) TYPE c.
CONCATENATE month '/01/' year INTO ls_date.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = ls_date
IMPORTING
date_internal = date.
ELSE.
day_number = ( ( recur - 1 ) * 7 ) + 1.
ENDIF.
ELSEIF day < weekday.
day_number = ( ( recur - 1 ) * 7 ) + ( weekday - day ) + 1.
ELSE.
day_number = ( ( recur - 1 ) * 7 ) + ( 7 - day ) + weekday + 1.
ENDIF.
IF date IS INITIAL.
CONCATENATE year month day_number INTO date.
ENDIF.
====================================
There still could be some loopholes in this....am not sure....but it sure did seem to work for a couple of random checks that I performed.
Brownie points to you for giving me a direction.
Thanks,
Puja. -
How to go into a function module through SE80 t - code
Hi All ,
How to go into a function module through SE80 t - code.
Thanks in advance.>
Balaji Krishnamoorthy wrote:
> Hi All ,
> How to go into a function module through SE80 t - code.
>
> Thanks in advance.
Hi,
With help of function group
Thanks & Regards
Edited by: Always Learner on Oct 16, 2008 2:31 PM -
Function module to choose the file for download and upload
what is the function module to choose the file for download and upload for presentation server.
give me with examplePlease search in SCN.
This has been discussed so many times. -
Function module to fetch SOBID field value from hrp1001 table
Hi,
Is there any function module, to fetch the value of the SOBID field from hrp1001 table by passing RSIGN,RELAT,OTYPE,SCLAS field values to that function module.
Regards,
Shalini.Hi Sikindar,
I am not able to find these function modules.I am getting message as function module not found.Please let me know is there any other function module.
Thanks,
Shalini. -
Reuse Release Codes for PR Release.
Hi!
Business requirement has resulted in exhausting the Release Codes for Purchase Requisitions. What might possibly be the impact of using the same Release Codes in different Plants and restricting the users by Roles.
Example:
Release Strategy X: Plant IND1 / Value >0: Release Code ZZ
Release Strategy Y: Plant IND2 / Value >0: Release Code ZZ
Assume that the PR Releasers are different (say Mr. A & Mr. B for Plant IND1 and IND2 respectively):
Create 2 Role:
Role X: Authorization for Plant IND1 and Release Code ZZ
Role Y: Authorization for Plant IND2 and Release Code ZZ
Now if we assign Role X to Mr. A and Role Y to Mr. B, Mr. A will get only PRs from Plant IND1 and Mr. B will get only PRs from Plant IND2. Hence they can use the same Release Code ZZ. But the PRs will be from their respective Plants.
Can you foresee any issues with the above setup? I tested the same in sandbox and it is working fine.
Suggestions welcome.
Regards,
RijuDear Riju,
There has not a issue of Release Strategy, you can give the access rigth through role.
But check the muliples plant & Release code.
Regards,
PK. -
How to get current release code for PO
Dear ALL,
We need a FM or method , which can give us current release code for PO.
We have PO number with us and PO details like Release strategy and release group.
Please help, if anybody knows the way.
Regards,
NileshHi,
check table EKKO you will get details for that release code
and check following link
[http://www.****************/Tutorials/Workflow/POReleaseStrategy/Details.htm]
Regards
Kailas Ugale -
Function module like ENQUEUE and DEQUEUE for function location.
Hi All,
I should be highly appreciate if any one help me for locking function module like ENQUEUE and DEQUEUE
for function location.
Thanks
ShawHi,
You can either use the standard way of locking by using :
data:lv_varkey TYPE rstable-varkey.
concatenate functional_location sy-mandt into lv_varkey .
* Lock table
CALL FUNCTION 'ENQUEUE_E_TABLEE'
EXPORTING
mode_rstable = 'E'
tabname = 'IFLOS'
varkey = lv_varkey
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
* Unlock table
CALL FUNCTION 'DEQUEUE_E_TABLEE'
EXPORTING
mode_rstable = 'E'
tabname = 'IFLOS'
varkey = lv_varkey.
Or,
As mentioned above create a lock object via transaction SE11.
Go to transaction se11:
--> Enter lock object name e.g EZ_IFLOS
--> Click on create
--> Enter description
--> Click on tables tab
--> Enter 'IFLOS' as table name
--> select lock mode
--. click on save and activate.
2 function modules will be created as DEQUEUE_EZ_IFLOS and ENQUEUE_EZ_IFLOS .
Regards. -
Release strategy for PREQs created from PM work order
Hi All,
I have an issue with determining release strategy for purchase requisition for external services created via PM work order (iw31 transaction).
We have activated release strategy for Purchase requisition based on the following characteristics:
CEBAN_PLANT
CEBAN_COST_CENTER_GROUP
CEBAN_MANUAL
Characteristic CEBAN_COST_CENTER_GROUP is defined via user exit based on the cost center used in the PREQ and a z table which contains all cost centers mapped to the corresponding cost center goups.
In the user exit we have consider to cases:
The first one is when a purchase requisition is created with account assignment K (cost center) then system is checking the z table and determines the right cost center group.
The second case is when a purchase requisition is created with account assignment F (internal order) then based on the order type and number the cost center in the order is defined and based on it the corresponding entry in the z table cost center group is assigned.
The third case is when purchase requisition for services is created automatically from PM work order. In this case the PREQ is again with account assignment F, but at the time when user exit is checking the input parameters the real number of the work order does not exist and system can not defined the other parameters.
We have defined for this requisitions in the release strategy for characteristic CEBAN_MANUAL creation indicator " F".
Has anybody of you defined release strategy for PREQs created out of work order before. How did you manage to trigger the release strategy?
Best Regards,
DesislavaHi,
For PM order find the costcenter in the settlement rule of the order or else find the costcenter in the Location tab of the order.
Consider this filed from order & write in the Z program to pick up the costcenter from there to find out the cost center group.
Regards,
Raj -
How to have more than 8 release code for a release strategy
Hi,
In standard only 8 level of release is possible for a release strategy. Our client requires more than 8 levels i.e., more than 8 release codes for a release strategy. How can we achieve this?
Pls provide your views/ideas.
Reards,Hello,
In case you require more than 8 levels in release strategy , write to SAP, maybe they could give a fitting reply.
By the way , 8 levels of release should be more than enough . Try to incorporate the client business process
within this.
Regards
Anis
Maybe you are looking for
-
Nokia Stereo Headset WH-205 buttons not working in...
I couldn't get Nokia Stereo Headset WH-205 buttons working in Music player. Anyone know how to enable the buttons on the headset. I want to use the play/stop/FW/BW buttons on the headset Many thanks again
-
Error when log into sql developer as sysdba
Hi iam able to loging in oracle 11g from command prompt as sysdba, the same when iam tried from sql developer with same credentials as sysdba its showing error invalid user or password. Could any one help me out o n ths pls?
-
Anyone have a problem with FIFA 13 when you finish a game in ultimate team it just hangs on retrieving data from server? Sometimes it get past this after around a minute but 90% of the time it says cannot connect to EAS FC servers and kicks me out of
-
Trex6.1 http server service is not running
Hi all, We installed SR1 with Trex.it worked fine.After that we upgrade to stack11.then Trex http server service is not working.We checked with TrexAdmin.py admin tool it showing red status.We tried all the options which was given in the Q&A of SDN f
-
Error with XMLType in AQ-Adapter
I want to create an AQ-Adapter which dequeues a XMLType-Payload. While creating a PartnerLink the following error occurs: "Error while getting Oracle Object XML schema definition for queue table ... Exception: 1" I've imported the related *.xsd in th