Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

Item Quantity not getting updated 'BAPI_SALESORDER_CHANGE'

$
0
0

Hi,

 

Delivery quantity should be updated in the sales order item quantity, I have written the below shown code to achieve the functionality but it is not working, please check and let me know what else needs to be passed to the BAPI.

 

Include MV50AFZ1 exit : FORM userexit_save_document

 

data: w_vbelv     type vbfa-vbelv,      w_quan      type lfimg,      w_vbeln     type BAPIVBELN-VBELN,      wa_INX      type BAPISDH1X,      wa_item     type BAPISDITM,      wa_schdl    type bapischdl,      wa_schdlx   type bapischdlx,      wa_order    type U_16028,             " Modified      wa_itemx    type BAPISDITMX,      itab_inx    type table of BAPISDITMX,      itab_schdl  type table of bapischdl,      itab_schdlx type table of bapischdlx,      itab_item   type table of BAPISDITM,      itab_order  TYPE TABLE OF U_16028,      itab_return type table of BAPIRET2.

FIELD-SYMBOLS: <fs_lips>  type LIPSVB, "Data type of XLIPS               <fs_order> type U_16028.
clear w_VBELV.
case sy-tcode.  when 'VL02N'.
select VBELV up to 1 rows from vbfa into w_VBELV                          where vbeln = likp-VBELN                          and vbtyp_n = 'J'                          and vbtyp_v = 'C'.
ENDSELECT.
when 'VL01N'.
get PARAMETER ID 'AUF' FIELD w_VBELV.
endcase.

if w_VBELV is not initial.
  select * from U_16028 into table itab_order where vbeln = w_vbelv.  if sy-subrc = 0.    loop at itab_order assigning <fs_order>.      READ TABLE xlips assigning <fs_lips> with key vgbel = <fs_order>-VBELN                                                    posnr = <fs_order>-posnr.      if sy-subrc = 0.         wa_item-ITM_NUMBER   = <fs_lips>-posnr.         wa_item-MATERIAL     = <fs_lips>-matnr.         wa_item-TARGET_QTY   = <fs_lips>-LFIMG.                           " Modified         wa_itemx-updateflag  = 'U'.         wa_itemx-itm_number  = <fs_lips>-posnr.         wa_itemx-TARGET_QTY  = 'X'.                                       " Modified         wa_itemx-MATERIAL    = 'X'.         wa_schdl-itm_number  = <fs_lips>-posnr.         wa_schdl-sched_line  = <fs_order>-etenr.         wa_schdl-req_qty     = <fs_lips>-LFIMG."         wa_schdlx-updateflag = 'U'.         wa_schdlx-itm_number = <fs_lips>-posnr.         wa_schdlx-sched_line = <fs_order>-etenr.         wa_schdlx-req_qty    = 'X'.         APPEND: wa_item   to itab_item,                 wa_itemx  to itab_inx,                 wa_schdl  to itab_schdl,                 wa_schdlx to itab_schdlx.         clear: wa_item, wa_itemx, wa_schdl, wa_schdlx.      endif.    endloop.

if itab_item is not initial.
    w_vbeln = w_VBELV.    wa_INX-UPDATEFLAG = 'U'.    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'          EXPORTING            SALESDOCUMENT               = w_vbeln            ORDER_HEADER_INX            = wa_INX          TABLES            RETURN                      = itab_return            ORDER_ITEM_IN               = itab_item            ORDER_ITEM_INX              = itab_inx            SCHEDULE_LINES              = itab_schdl            SCHEDULE_LINESX             = itab_schdlx.   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'    EXPORTING      wait = 'X'.    endif.   endif.  endif.

 


After bdc screen doesnt get fill automatically

$
0
0

Hi,

i have done bdc in function module,the values i enter from import parameter gets in my bdc recording,but when i call transaction xd01,

only screen comes the value doesnt get fill,please help,

please in little detail as i am a fresher.

Selecting records in two different ALVs

$
0
0

I would like have 2 ALVs in the same screen and when I select one line in the first, the second automatically is selected:

 

ALVs.jpg

For example:

 

If I select the record 20 in ALV1, the correspond record in ALV2 is selected and vice-versa.

 

 

Thanks!

Customer master data transfer to other client by ALE

$
0
0

Hi all,

 

I want to transfer the customer master data by ALE to other client. I maintained the model view with DEBMAS and ADRMAS message type. But still the data were not transferred properly. When I search the old posts, I come to know that there is serialization of message type is required. This I dont know how to configure.

 

Let me know procedure to do this.

 

Regards,

Bharathkumar.MG

Standard field in SM30

$
0
0

Good morning everyone,

 

I'm having a problem in creating the updater table by SM30, I need every time this table is updated 3 fields get recorded, User name, system date and system time, but I'm not getting to do these fields to be updated alone.

 

if anyone can help I'll be really grateful

Abap report with header

$
0
0

Hi,

I am trying to create an ABAP report with a header and its corresponding list in the following format:

 

Vendor:---------                           

outline Agreement:

P.O.Number:123456

and below its corresponding list(line items)

 

service no | Service Desc|Total exe|Unit of mea|Total amount|

 

and then again the same.

 

Vendor:---------                           

outline Agreement:

P.O.Number:897659

and below its corresponding list(line items)

 

service no | Service Desc|Total exe|Unit of mea|Total amount|

 

So each time the p.o number is different.

 

Also i need the footer to change according which involves some calculations to change as per the p.o number and line items.

I tried to do this using control breaks but the list does not populate as per the p.o number

 

Can anyone suggest how to proceed with this?

 

Regards

Sarita

How to implement BAPI_RE_CN_CHANGE

$
0
0

Hii All,

 

I have an requirement in which I have to close the current condition of the contract no. & then create new condition for the same for tcode RECN for REFx module. I have found out BAPI_RE_CN_CHANGE for this purpose but dont able to understand that what parameters should I pass to BAPI.

Please help me out.

 

Thanks

Sachin

Update new fields in table control prior to validation

$
0
0

Hello,

 

I'm modifying a dynpro application with the addition of two fields to an internal table linked to a table control( e.g. item level table).  These fields(in entire table) are not updated when I get to my validation routine.  I need to update this entire item level table at ENTER or SAVE so I can determiine if there have been any duplicate entries in these new fields.   The validation routine is within a Loop with CHAIN on these fields in PAI so I need all screen entries updated prior to validation.  Any ideas?

 

Thank you,

JR


Issues with BAPI_ACC_DOCUMENT_CHECK

$
0
0

Hello Guys,

                  I am having Issues with BAPI_ACC_DOCUMENT_CHECK. The error which it is throwing is:

 

G/L Account ______ is not defined in the chart of accounts ___.

 

Please help me solve this error and also please tell me where exactly in that BAPI do we need to pass OFFSET_GLACCOUNT.

 

Note  There was an old thread regarding this issue but the solution link given over there is not working, so I had to open this thread.

 

Please help me out regarding this problem.

 

Thanks in Advance.

 

Message was edited by: Matthew Billingham - removed certain text

Screen Parameters in include

$
0
0

Hi Dear All:

    I write a report with PNP. In the main report I add some includes such as z_data, z_screen, z_form. Each of these include container data declaration, screen parameters,forms. The codes are:

 

REPORT  zxxxxx.

INCLUDE zxxxxx_data.
INCLUDE zxxxxx_form.
INCLUDE zxxxxx_screen.

*---------------------------------------------------------------------*
INITIALIZATION.
*---------------------------------------------------------------------*
  PERFORM initalize_paramteters.

*---------------------------------------------------------------------*
START-OF-SELECTION.
*---------------------------------------------------------------------*
GET pernr.
  PERFORM fill_eeinfo.           " USING so_inum.

*---------------------------------------------------------------------*
END-OF-SELECTION.
*---------------------------------------------------------------------*
  PERFORM print_retroinfo.

 

In the include zxxxxx_screen. I put the codes:

SELECTION-SCREEN BEGIN OF BLOCK fr2 WITH FRAME TITLE text-fr2.

  PARAMETERS: c_ztp AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK fr2.

 

 

But in the include zxxxxx_form. when I use c_ztp. SAP give the error that c_ztp does not exist!  As you know parameters are components of a selection screen that are assigned a global elementary data object in the ABAP program. Can anyone tell me why. Thank you so much.

 

Splitting records in internal table

$
0
0

Dear All,

 

I am facing a problem while passing values to a function module i am getting an error 'DBIF_RSQL_INVALID_RSQL'.

I found that i am passing too many values to that Function module from an internal table. So now iam getting around 20000 records in this internal table and i need to split as 4000 records as a batch and need to pass, how i can achieve this.

 

With regards,

Tony.

about dictionary search help

$
0
0

Hello, in custom defined table A there exists a field B.

But field B does not have a search help.

Does anyone know how to let it get out?

How to extend material for new plant using LSMW

$
0
0

Hi,

 

I have requirement to extend material for new plant.

I've lsmw ready for creation of material using DINP: 'RMDATIND'.

Can i use same for extending material ? please let me know how to extend it.

 

please share your suggestions.

Wanna get a mail in my mailbox whenever workflow is executed?

$
0
0

Hi All,

 

I have just created a workflow with a step user decision and it is successfully executed and i can see the result in business workplace. but i want a notification mail in my personal mailbox (Gmail or Outlook mailbox) whenever workflow executed.

 

Can anyone please tell me the required configuration setting. And what could be the possible steps and tcode to performed the settings.

 

Thanks in advance!

 

Regard's,

Intekhab Khan

how to show multiple line item errors while Posting PO in Me21N

$
0
0

Hi Experts,

 

http://scn.sap.com/thread/3370195

 

Based on the above thread, I have coded by following ways, here in second coded lines --> maintained all the error messages. These all error messages should populate while posting PO (with multiple line items). If you need any clarity in this post, always free to respond you soon.

 

DATA: WA_ TYPE ZTABLE,
          ITAB TYPE STANDARD TABLE OF ZTABLE.

SELECT * FROM ZTABLE
                 INTO TABLE ITAB
                 WHERE DOC_TYPE = I_EKKO-BSART.

LOOP AT ITAB INTO WA.

READ TABLE TEKPO WITH KEY MATKL = WA-MAT_GRP.

IF SY-SUBRC = 0.

   MESSAGE E065(ZMSG)
   with 'Material group' TEKPO-MATKL
   'not maintained for PO type' WA-DOC_TYPE.           """ First founded error msg is populating. What about other items??

ENDIF.

ENDLOOP.

 

--------------------------------------------------------------------------------------------------

 

 

DATA: WA TYPE ZTABLE,

          ITAB TYPE STANDARD TABLE OF ZTABLE.

 

DATA: WA_ERROR TYPE STRING,

      IT_ERROR TYPE STANDARD TABLE OF STRING.

 

SELECT * FROM ZTABLE

                INTO TABLE ITBLE

                WHERE DOC_TYPE = I_EKKO-BSART.

 

 

LOOP AT TEKPO.

 

  READ TABLE ITAB INTO WA WITH KEY MAT_GRP = TEKPO-MATKL.

 

  IF SY-SUBRC = 0.

 

    CONCATENATE 'Material group'

                            TEKPO-MATKL

                            'not maintained for PO type'

                            WA-DOC_TYPE

          INTO WA_ERROR

          SEPARATED BY SPACE.

 

    APPEND WA_ERROR TO IT_ERROR.

 

  ENDIF.

 

ENDLOOP.

 

LOOP AT IT_ERROR INTO WA_ERROR.

 

  MESSAGE WA_ERROR TYPE 'E'.  """" Here also same like above, first record of error message is populating. What about remaining??

 

ENDLOOP.

 

 

 

 

Regards,

Kiran


Hi I am getting Error in BAPI_PO_CREATE1

$
0
0

Dear All,

 

 

I am getting error TD 600 Text *ID*  Language not found in BAPI_PO_CREATE1.

 

while creating PO by BAPI.

 

Thanks,

Arsul

Problem about search help object

$
0
0

Dear,

 

I created a search help object using Tcode SE11, but there is a problem in the second search based on the existend result.

 

When I filtered the current result, I found all the value of numeric fields have been cut incorrectly

that part of the values were connected to other fields next to them.

 

Is there any one ever faced this problem?

How should I do to terminate the problem that has already troubled me for one week?

 

Thanks advance!

 

BR/Kevin Liu

Smartform in Arabic - Dots prints at beginning of text

$
0
0

Dear All  We have one smartform for Goods Receipt.

 

We have desinged in Arabic Language.

( ls_control_param-langu = 'A'.)

 

All are okay.  But When a vendor name contains like  Co.  or LTd.   then the Dot is printed in front of the text.

 

Example :     MyCompany Co. Ltd.    -->  is printed as  .My Company Co  Ltd

 

Can someone help me where I am missing.

 

Regards,

Venkat

How to know if a entered value exists in DB

$
0
0

Hello Guys,

                    This might be a silly question but I am very new to SAP. I have a country table which has all country codes. I have created one more table countrycheck for inserting only the codes available in the country table. My question is in the o/p screen how to check the value entered by the user and validate it against the available country codes.  Example: If I have only one country code say "IN" for India and the user enters "US", the system should give an error in the status bar saying its not a valid code.. I have written code till here..

 

REPORT  ZCOUNTRY MESSAGE-ID ZCOUNTRYCLASS.

 

 

TABLES ZCOUNTRY1.

 

 

TABLES ZCOUNTRYCHECK.

 

 

PARAMETERS: C_NAME TYPE C LENGTH 2.

 

 

DATA ITAB LIKE ZCOUNTRY1 OCCURS 0 WITH HEADER LINE.

 

 

SELECT * FROM ZCOUNTRY1 INTO TABLE ITAB.

 

 

LOOP AT ITAB.

 

 

VALIDATION TO BE DONE HERE

 

 

ENDLOOP.

 

ZCOUNTRYCLASS is the message class to display error.

LSMW - Hire employees

$
0
0

Hello All,

 

We are working on creating a LSMW for employee mass hire upload.

So we need to create infotypes 0,1, 2, 3, 6, 7, 8, 9, 19, 41, 77, 94, 169, 170, 207, 208, 209, 210 all through a single file upload.

 

Whats the best way to get started. Create separate recordings for each of these ?

Also, we need to create positions and assign to these employees.

 

Please suggest ideas. Whats the best way to achieve this functionality. We currently have a custom program which runs BDCs for this, however we want to replace it with LSMW.

 

Regards,

Samta.

Viewing all 8332 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>