To save PO item text at the time of creation
Hello Friends,
I have a requirement to save PO item text while creating from ME21N....
I need to display the Material Classification(particular characteristics) data in the po Item text..
I have done my coding in the particular User exit....
i am getting the material classification data and passing it to SAVE_TEXT function Module and after that doing COMMIT_TEXT.....
Code running fine without any error but not saving the text to PO item text....
We have code for PO Header text in the same user exit and its working fine.... Can you please focus on this and let me know any way to proceed....
CALL FUNCTION 'INIT_TEXT'
EXPORTING
id = 'F08'
language = 'E'
name = fname - PO NUM
object = 'EKPO'
IMPORTING
header = head
TABLES
lines = in_text1
EXCEPTIONS
id = 1
language = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = head
IMPORTING
newheader = head
TABLES
lines = in_text - HAVING CLASS DATA TO BE DISPLAYED
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDLOOP.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
keep = 'X'.
Waiting for you reply...
Regards,
SAM
Hello
Use
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
SAVEMODE_DIRECT = 'X'.
instead
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
keep = 'X'.
Similar Messages
-
I want to make the item text of the combobox to be aligned vertically(Centred) . Actually I increased the height
of the combobox and after the increasing the combobox height, the text is not centred vertically.The code
snippet for increasing the height is as follows,
m_SpecifyCombo.SetItemHeight(-1,20);//CCombobox m_SpecifyCombo
After increasing the height the text in the combobox is not in the centre as shown in the below image,
But I want the text to be centred as shown in the below image.
Code snippet for owner drawn combobox:
#if !defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
#define AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
typedef enum {FONTS} STYLE; //Why have I enumerated, Cos, Maybe I might want something other than Fonts here
class COwnerDrawCombo : public CComboBox
// Construction
public:
COwnerDrawCombo();
COwnerDrawCombo (STYLE);
// Attributes
public:
void SetHilightColors (COLORREF hilight,COLORREF hilightText)
m_clrHilight = hilight;
m_clrHilightText = hilightText;
void SetNormalColors (COLORREF clrBkgnd,COLORREF clrText)
m_clrNormalText = clrText;
m_clrBkgnd = clrBkgnd;
static BOOL CALLBACK EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData);
void FillFonts ();
int GetSelFont (LOGFONT&);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCustComboBox)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~COwnerDrawCombo();
// Generated message map functions
protected:
STYLE m_enStyle;
COLORREF m_clrHilight;
COLORREF m_clrNormalText;
COLORREF m_clrHilightText;
COLORREF m_clrBkgnd;
BOOL m_bInitOver;
void DrawDefault (LPDRAWITEMSTRUCT);
void DrawFont(LPDRAWITEMSTRUCT);
void InitFonts ();
//{{AFX_MSG(CCustComboBox)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
//}}AFX_MSG
afx_msg long OnInitFonts (WPARAM, LPARAM);
DECLARE_MESSAGE_MAP()
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif //!defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
// OwnerDrawCombo.cpp : implementation file
#include "stdafx.h"
#include "combobox.h"
#include "OwnerDrawCombo.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define WM_INITFONTS (WM_USER + 123)
//I chose 123 cos nobody might use the same exact number.. I can improve this by use RegisterWindowMessage..
// COwnerDrawCombo
//Initial values of the text and highlight stuff
COwnerDrawCombo::COwnerDrawCombo()
m_enStyle = FONTS;
m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
m_clrBkgnd = GetSysColor (COLOR_WINDOW);
m_bInitOver = FALSE;
COwnerDrawCombo::COwnerDrawCombo (STYLE enStyle)
m_enStyle = enStyle;
m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
m_clrBkgnd = GetSysColor (COLOR_WINDOW);
m_bInitOver =FALSE;
COwnerDrawCombo::~COwnerDrawCombo()
BEGIN_MESSAGE_MAP(COwnerDrawCombo, CComboBox)
//{{AFX_MSG_MAP(COwnerDrawCombo)
ON_WM_CREATE()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
ON_MESSAGE (WM_INITFONTS,OnInitFonts)
END_MESSAGE_MAP()
// COwnerDrawCombo message handlers
void COwnerDrawCombo::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
//I might want to add something else someday
switch (m_enStyle)
case FONTS:
DrawFont(lpDrawItemStruct);
break;
//I dont need the MeasureItem to do anything. Whatever the system says, it stays
void COwnerDrawCombo::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
void COwnerDrawCombo::DrawFont(LPDRAWITEMSTRUCT lpDIS)
CDC* pDC = CDC::FromHandle(lpDIS->hDC);
CRect rect;
TRACE0 ("In Draw Font\n");
// draw the colored rectangle portion
rect.CopyRect(&lpDIS->rcItem);
pDC->SetBkMode( TRANSPARENT );
if (lpDIS->itemState & ODS_SELECTED)
pDC->FillSolidRect (rect,m_clrHilight);
pDC->SetTextColor (m_clrHilightText);
else
pDC->FillSolidRect (rect,m_clrBkgnd);
pDC->SetTextColor (m_clrNormalText);
if ((int)(lpDIS->itemID) < 0) // Well its negetive so no need to draw text
else
CString strText;
GetLBText (lpDIS->itemID,strText);
CFont newFont;
CFont *pOldFont;
((LOGFONT*)lpDIS->itemData)->lfHeight = 90; //9 point size
((LOGFONT*)lpDIS->itemData)->lfWidth = 0;
newFont.CreatePointFontIndirect ((LOGFONT*)lpDIS->itemData);
pOldFont = pDC->SelectObject (&newFont);
pDC->DrawText(strText, rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
pDC->SelectObject (pOldFont);
newFont.DeleteObject ();
void COwnerDrawCombo::InitFonts ()
CDC *pDC = GetDC ();
ResetContent (); //Delete whatever is there
EnumFonts (pDC->GetSafeHdc(),NULL,(FONTENUMPROC) EnumFontProc,(LPARAM)this);//Enumerate
m_bInitOver = TRUE;
BOOL CALLBACK COwnerDrawCombo::EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData)
if (dwType == TRUETYPE_FONTTYPE) //Add only TTF fellows, If you want you can change it to check for others
int index = ((COwnerDrawCombo *) lpData)->AddString(lplf->lfFaceName);
LPLOGFONT lpLF;
lpLF = new LOGFONT;
CopyMemory ((PVOID) lpLF,(CONST VOID *) lplf,sizeof (LOGFONT));
((COwnerDrawCombo *) lpData)->SetItemData (index,(DWORD) lpLF);
return TRUE;
int COwnerDrawCombo::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CComboBox::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
if (m_enStyle == FONTS)
//SetItemHeight(-1,30);
PostMessage (WM_INITFONTS,0,0);
return 0;
long COwnerDrawCombo::OnInitFonts (WPARAM, LPARAM)
InitFonts ();
return 0L;
void COwnerDrawCombo::OnDestroy()
if (m_enStyle == FONTS)
int nCount;
nCount = GetCount ();
for (int i = 0; i < nCount; i++)
delete ((LOGFONT*)GetItemData (i)); //delete the LOGFONTS actually created..
// TODO: Add your message handler code here
CComboBox::OnDestroy();
void COwnerDrawCombo::FillFonts ()
m_enStyle = FONTS;
PostMessage (WM_INITFONTS,0,0); //Process in one place
int COwnerDrawCombo::GetSelFont (LOGFONT& lf)
int index = GetCurSel ();
if (index == LB_ERR)
return LB_ERR;
LPLOGFONT lpLF = (LPLOGFONT) GetItemData (index);
CopyMemory ((PVOID)&lf, (CONST VOID *) lpLF, sizeof (LOGFONT));
return index; //return the index here.. Maybe the user needs it:-)
void COwnerDrawCombo::PreSubclassWindow()
// TODO: Add your specialized code here and/or call the base class
//Tried to do what Roger Onslow did for the button.. Did not work..?? Any R&D guys around :-)
Can anyone please let me know how can I achieve this.
Any help can be appreciated.
Thanks in advance
SivaVHi sivavuyyuru,
I cannot find a easy way to make this.
I think you may need to draw your own Combo Box control. And you could change the edit control more like static text. Check the article:
http://www.codeguru.com/cpp/controls/combobox/fontselectioncombos/article.php/c1795/Owner-Drawn-Font-Selection-Combobox.htm
In the resource editor, Owner draw -> variable , Has string->true, type->drop list.
The result:
Best regards,
Shu Hu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to add the line item text in the Ledger line item report
Hi SAP Gurus,
I having one requirement from the user. He wants the line item text which we will enter in FB60/FB70/FB50 has to be shown in the Ledger line item report. Right now this field is not available. Is there any possible we can make this line item text in the ledger line item report i.e. FBL1N/FBL3N/FBL5N?
advance thanks for the help.
Regards,
Deva.Hi,
You can do the below to get this. (You can change the names of the function modules as per your wish/ organization naming convention):-
Step 1:-
Create function module Z_GET_SGTXT as below:-
Import:-
BELNR LIKE BKPF-BELNR
BUKRS LIKE BKPF-BUKRS
BUZEI LIKE BSEG-BUZEI
GJAHR LIKE BKPF-GJAHR
Export:-
PRCTR LIKE BSEG-SGTXT
FUNCTION Z_GET_SGTXT.
""Local Interface:
*" IMPORTING
*" VALUE(BELNR) LIKE BKPF-BELNR
*" VALUE(BUKRS) LIKE BKPF-BUKRS
*" VALUE(BUZEI) LIKE BSEG-BUZEI
*" VALUE(GJAHR) LIKE BKPF-GJAHR
*" EXPORTING
*" VALUE(SGTXT) LIKE BSEG-SGTXT
SELECT SINGLE SGTXT FROM BSEG INTO SGTXT WHERE GJAHR = GJAHR
AND BELNR = BELNR
AND BUKRS = BUKRS
AND BUZEI = BUZEI.
ENDFUNCTION.
Step 2:-
Then create the Function Modules as below:-
Z_LINE_ITEMS_GET_SGTXT (Copy of SAMPLE_INTERFACE_00001650)
FUNCTION Module Z_LINE_ITEMS_GET_SGTXT.
""Local Interface:
*" IMPORTING
*" VALUE(I_POSTAB) LIKE RFPOS STRUCTURE RFPOS
*" EXPORTING
*" VALUE(E_POSTAB) LIKE RFPOS STRUCTURE RFPOS
Initialize Output by using the following line
E_POSTAB = I_POSTAB.
E_POSTAB = I_POSTAB. "<-- important
CALL FUNCTION 'Z_GET_SGTXT'
EXPORTING
BELNR = I_POSTAB-BELNR
BUKRS = I_POSTAB-BUKRS
BUZEI = I_POSTAB-BUZEI
GJAHR = I_POSTAB-GJAHR
IMPORTING
SGTXT = E_POSTAB-SGTXT
EXCEPTIONS
OTHERS = 1.
ENDFUNCTION.
Step3:-
Transaction FIBF:-
Settings -> Products -> of a Customer
SGTXT Text in Line Item Display Active
Settings -> P/S Module -> of a Customer
00001650 SGTXT Z_LINE_ITEMS_GET_SGTXT
Step 4:-
Create the layout for FBL*N with display of the TEXT.
Regards,
Gaurav -
Component Item text is not copying to PR (Item Text) if the PR is frm MD51
Hi All,
I am facing one problem in PR Item text.
The issue is,when we attach a component to network activity,we have an option to maintain item text for the component.If the procurement type is PR+Reservation,we'll get PR no from CJ20N.System is displaying the item text in PR item detail "item text" tab.
But if the component has procurement type isReservation for WBS Element & it has procurement indicator "F",then we'll run MRP for getting a PR no.This PR is not displaying the Item text in PR "Item text" tab.
It has one configuration setting in MM i.e SPro>MM>Purchasing>PR>Texts for Purchase Requisitions.
I have checked the config & its fine.
So,if we are creating the PR for projects from MD51,then system is not displaying Item text in PR.
If anybody came across this issue help me..
Thanks a lot.
sureshI am alsw waiting for a reply for the above question.
guys,.....help me out
anyone wants me, more explanation for the problem?
regards
surya
Edited by: suryapampana on Dec 21, 2009 11:41 AM -
My daughter and granddaughter have the same model iPhone. I can go messages and text my granddaughters phone from my ipad2, but when I try to text my daughter I get the message that she is not registered with I message, but she is registered and gets texts all the time. What do we need to do?
Pattypegr wrote:
The blue bubble will not turn on on the iPad when I try to message her on her I phone. She has IMessage turned on.
What blue bubble are you trying to turn on? If you mean that the Send button will not work, go to Settings>Messages>Show Subject Field>Off. Make sure that is set to off.
If you send an iMessage, the texts between the devices appear in a blue bubble.
iMessages only work between iOS devices and they are different than the standard text messages that any cell phone can send to another cell phone. -
My daughters iphone 4 isn't letting her receive/send texts all the time. Most of the time she NEVER receives the texts when I'm sitting in the same room with her! This is her second phone with the same problem! What is the fix? This recent phone, was my wife's,till she upgraded, and she had NO problem with texts, so it must be something with my daughters settings, that she backed up from the old phone when we switched?
If it is a text issue and not a call issue I would guess it has something to do with her iMessage settings. Try turning iMessage off and see if she can receive texts.
-
Alert message is needed at the time of creation ,if it reaches ,the maximu
DEAR SA EXPERTS,
Can you please me that alert message is needed at the time of creation ,if it reaches ,the maximum stock level (Stock+level)
Thanks
MohitHi,
Please refer the below links.
Alert Message
Re: Alert Message
Hope it helps you.
Thanks. -
At the time of creation of POaccount assignment is coming mandatory
Dear all;
At the time of creation of PO system showing the msg that the account assignment is mandatory for the material ,how to overcome this?
Kindly suggest whre in material master record I can change settings for account assingment ,or the control is somewhere else.
Regards;
Joydeep MukherjeeHi
In OMS2 t-code
for your material type and plant ,you have to mark value based and qunaity based updation mark
Regards
kailas Ugale -
Problem at the time of creation order
Dear Gurus,
facing update termination error at the time of creation/change the sales order..in development system
after some analysis, found one more error due to which above mention error is coming
report run : "RMCSUTIC" : check utility logistic info system
after running this report system giving error message "Unit O2 : No DDIC Information for source field OI0BW_ADQN - OIMSEHI1"
but when but in production server it's working fine without error message
kindly suggest some solution for the same
Regards,No DDIC Information for source field
You may have to check the following notes. Take the help of your basis team.
1) 542872
2) 557683
3) 579022
4) 645136
thanks
G. Lakshmipathi -
Issue at the time of creation of transfer order for inbound delivery
Hello,
I am facing one issue at the time of creation of transfer order for inbound delivery.
If I create inbound delivery for purchase order with account assignment as 'M' (Ind. cust. w/o KD-CO), inbound delivery is not updated. Also document flow for inbounde delivery s not updated. I can create N number of transfer orders for on inbound delivery. Need help to resolve issue.
If I create inbound delivery for purchase order with account assignment other than 'M' (Ind. cust. w/o KD-CO), inbound delivery and document flow is updated.
Thanks and Regards,
NikhilHi
In OMS2 t-code
for your material type and plant ,you have to mark value based and qunaity based updation mark
Regards
kailas Ugale -
Different batch no in prod order at the time of creation of prod order
Hi, we need different batch numbers in production order at the time of creation of production order. tried in system, i can able to create only one batch no at the time of creation of order. we need different batch no at the time of order creation and same no should be assigned at the time of GR from prod order. pls advise how to map this.
Dear,
Use the Exit EXIT_SAPLCOBT_001 under enhancement PPCO0001 where-in based on your requirement you can create batch for your order. You can use CALL FUNCTION 'VB_CREATE_BATCH' to create the batches as per your requirement.
Also make sure the automatic batch creation setting in Prodn Scheduling profile has been turned-off so that the batch is created only through the user-exit.
Refer this thread,
Re: Batch creation
Please try and revert back.
Regards,
R.Brahmankar -
Default Header text comes in PO at the time of creation
Hi Friends,
my problem is that a default Header text must come on the PO based on the user or purchasing group at the time Creation (In Transaction ME21N).
Is there any user exits or badi for it. I have already searched for them but i have not got any thing. Please help me.
Thanks for ur valuable answersyes i know that through copy control we can get default text but it is item level text instead of the header text.and other thing it does not depend on the user or purchasing group. I default header text that is populated imediately when user call ME21N. So is there any BADI or user exit for that.Please reply.
Thanks for ur reply and valuable answers
null -
In the family share program, I put a time restraint on my phone so that I couldn't use it during a certain period of time. If I attempt to send a text message during that time, the message won't be sent. But when the time restriction is ended and my phone is unlocked, will that message automatically try again? Or will I have to write and send a new message?
That is a great question lsellnow! Messages are not save for later delivery. You will have to rewrite your message when the line is not under any restriction.
AntonioC_VZW Follow us on Twitter at www.twitter.com/VZWSupport -
Want to change item category at the time of order creation
Hi Gurus,
Client require to implement individual PO scenario.
I was configured the same and working fine.
I am facing problem at the time of item category determination.
User using same material and order type and they are not ready to accept to create new order type.
Now My order type is OR and item category group is NORM and right now system determine item category TAN.
User not want to change manually at the time of order creation.
I have specific condition on which i want to apply this logic.
Now i want to determine TAB item category through some user exits or enhancement.
Can anyone suggest exact in which user exit or enhancement i have to change.
Thanks & Regards,
Chirag1. Use TCode 0VVW for creating a Z Item Usage, say, ZPO1
2. Do an item Cat determination in VOV4, as
Sales Doc type
Item Cat Group
Usage
Item Category
OR -
NORM -
ZPO1 -
TAB
3. Maintain Customer Materials Info Record by using VD51.
In item screen for Cust-Mat combination maintain Item usage
Regards
JP -
Dear All,
I had come across one issue.
In the Purchase order print i am printing the item text and also the header text.
But in this if it is having the symbol " & " then the text after the "&" symbol was not printing.
After that symbol it was skipping.
Can anyone help me in this.Hi,
'&' is used for priting variable's values e.g suppose there is a variabel 'lv_var' and if i want to print the value of it in script i have
to write code as '&LV_VAR&' (& in the start and end of the variable name), and this is why the text after '&' in your line item, is
not getting printed.
To resolve this issue just replace '&' with 'and' (hope is is being used for AND).
Regards,
Raj Gupta
Maybe you are looking for
-
Adobe always quits unexpectedly in Mac when I read a bit fast. It is the latest update. How can i deal with it, plz?
-
SO number in reference field in accounting doc after GI posting
Hello, In the header of accounting document, which is being created after posting goods issue, in the "Reference doc." field delivery number is displayed. Is it possible to have in this field sales order number?? If so, where can I change this set up
-
Macbook Air (mid 2012) Thunderbolt to HDMI Stopped working
Hey Guys, I have searched this issue and have found several threads some 50+ pages long but I could not find a soluition. I currently have a macbook air 13" mid 2012 model. Problem: I was using a thunderbolt to HDMI cable to watch movies on my SONY B
-
IPad connected to network, still can't access internet
Hi everyone - I hope someone can help. Starting a few days ago, my iPad (and my iPod Touch) say they're connected to our wireless network, but, when I try to pull up a web page or access the App Store, I get an error message saying that I'm not conne
-
Can't download iTunes to my PC. Message says "Service 'Apple Mobile Device' failed to start. Verify that you have sufficient privileges to start system services."