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

Additional Fields for MCBE

$
0
0

Hi all,

I want to see coverage profile information (MRP2 - MARC-RWPRO field) on MCBE report.

Is there any way for this?

 

Thanks.


Scheduled BACK GROUND Job not getting released in SM37, not sure if it's an Authorization issue or some other issue?

$
0
0

Hello Experts,

 

We have scheduled a Back Ground Job using below FM's

JOB_OPEN,

JOB_SUBMIT,

BP_JOB_READ,

BP_JOB_MODIFY,

JOB_CLOSE

now the issue is,Job is getting created and scheduled successfully, but its not getting released, can some one suggest whether its an Authorization Issue or some other issue in the code and what needs to be done here to resolve it?

 

Thanks in advance..!!

 

 

 

 

 

 

Regards,

Dilli.

trigger workflow event from badi

$
0
0

Hi


I am using  cl_swf_evt_event=>raise trigger workflow from Badi .but it need commit work to trigger workflow.

commit work is not recommended to use in badi or user exit.


TRY.

CALL METHOD cl_swf_evt_event=>raise

EXPORTING

im_objcateg = 'CL'

im_objtype = lv_objtype

im_event = myevent

im_objkey = myobject_key.

 

CATCH cx_swf_evt_invalid_objtype .

CATCH cx_swf_evt_invalid_event .

ENDTRY.





as soon as event get trigger workflow should start.



which event should i use to achieve my requirement?


 

regards,

satyanarayana

Get Cursor

$
0
0

Hello Experts,

 

Im trying to generate a secondary list using get cursor i/p range of mat no. when the user double clicks on mat no. it should display the selected material no. in sec list but im getting only the last mat no. details. I have tried hide and clear statements too but for me its not coming.

 

IF FNAM = 'WA_MARA-MATNR'.

    SELECT SINGLE * FROM MARA INTO WA_MARA WHERE MATNR = FVAL .

      WRITE:/ WA_MARA-MATNR, WA_MARA-MBRSH, WA_MARA-MTART, WA_MARA-MATKL, WA_MARA-MEINS, WA_MARA-ERSDA, WA_MARA-ERNAM.

  

 

 

  ELSEIF FNAM = ''.

...

...

... 

...

...


  ENDIF.

 

 

ENDFORM.

 

O/P:

 

Basic list:

 

23                 ROH  EA  1

38                 HALB PC  M

43                 HAWA HR  1

58                 HIBE PC  M

59                 HIBE PC  M

68                 FHMI PC  A

78                 DIEN PC  M

88                 FERT PC  M

89                 FERT PC  M

98                 HALB PC  M

 

Secondary list if mat no.

 

98                 M HALB 002       PC

 

 

only last value is coming

How can I create a MS Word Document w/o SAP GUI ?

$
0
0

Hi,

having an UI5 Application I want to execute a service that should create a MS Word document in ABAP Stack - coming via Gateway.

That means that I do not have a SAP GUI environment running so OLE Automation is not working. This is the same situation when trying to create a MS Word document in batch mode.

 

Is there any possibility to create a MS Word document and saving on desktop when executing ABAP coding triggered from outside (Browser)?

 

Thx a lot

Achim

PDF to Spool with Page count

$
0
0

Hi

 

How to upload PDF to SPOOL with PDF Page Count.

 

My Requirement is generate PDF Spool with Page numbers.

 

Thanks

Jhon

Purchase Order(PO) bapi_po_change not updating condition value - kwert field

$
0
0

Hi Everyone,

 

I am a ABEP er.

 

 

I used BAPI_PO_CHANGE to update the condition value(KBETR-Amount col in pricing)  in purchase order is working fine, But Now I need to update the KWERT(Condition Value col in pricing) field in the purchase order but I didn't seen any field (only cond_value field is available and the value passing to condition_value only updates the amount column not kwert field)  in bapi condition structure to pass kwert field, I tired more by different combinations but the KBETR field is updating not KWERT field.

 

My Condition Type is '%' and Amount/Fixed value. so It's allowing me to enter the kwert-condition value column manually from me22/me22n but not through bapi, Please advice me. Thank in Advance.

Generate Output Type on 'SAVE' in VA01/VA02 & create its PDF document

$
0
0

Hi Experts,

 

I have a requirement to generate an Output type(Print Output) automatically when a Sales Order is saved in VA01/VA02.This layout has to be converted into a pdf and send as an attachment in a mail to a particular email-id.

 

My questions are:

1. How do we generate the Output Type automatically on 'SAVE' in VA01/VA02 (Not through 'Issue Output to')?

2. How do we convert this layout  to a pdf document automatically?

 

Thanks in advance,

Regards,

Blessy


problem in copying the function module.

$
0
0

Hi All,

I have to Copy the standard function modules "FI_ITEMS_DISPLAY" and "ITEM_DERIVE_FIELDS".

The Function group for both of above FM is "FI_ITEMS".

 

What i did is I went to SE80 ,I copied down the Function Group 'FI_ITEMS' to 'ZFI_ITEMS'.

 

later on i copied the standard function modules 'FI_ITEMS_DISPLAY' and 'ITEM_DERIVE_FIELDS'

to the 'ZFI_ITEMS_DISPLAY' and 'ZITEM_DERIVE_FIELDS' resp.in the same function group 'ZFI_ITEMS'.

 

Then i made some changes to these copied modules (I did change the structure of it_items from RFPOSXEXT to ZRFPOSXEXT in ZFI_ITEM_ITEM_DISPLAY,and same change in ZITEM_DERIVE_FIELDS but for the parameter s_item).

And finally i activated these FM..and it got activated also.

 

But later on when i used these FM in my report...error occured saying that -

  "The name of the function module to be called is "ZITEM_DERIVE_FIELDS".

but "ZITEM_DERIVE_FIELDS" cannot be found in its function group. "

    hence i thought of activating the function group ZFI_ITEMS,which was inactive before to this...but when i tried activatin this FM it was giving hell lot of errors showing conflict occured at diffrent places,I think just because of the change (structure of IT_ITEM chnged from RFPOSEXT to customised ZZRFPOSXEXT).

I am helpless in removing all this errors ...

 

Can anybody suggest where did i go wrong?

 

And what is the right way to copy the function module.?

 

If possible reply me ASAP.

 

Thanx in advance.

F4 help needed in Bulk Schedule Standard Screen.

$
0
0

Hi,

   I have a requirement that I have to add F4 help functionality on standard screen of "Bulk Schedule (TCode: O4F1) " at HEADER section Tab on field Refrence (ROIGS-XBLNR).

 

scr.png

 

I am unable to locate any solution. Please help asap.

 

 

Regards

Piyush

Cl_cost_estimate

$
0
0

Hi experts

 

we have extended sap table CKIS to add a few z fields to cost estimate line items.

 

We plan to push data via cl_cost_estimate. However do not see any method that allows to populate data into the custom fields

 

please advise

how to create a new BDT object

$
0
0

It seems in BUS0 we can create a new BDT object(e.g., like BP)

But I dont know the full steps of doing that.

Can anyone give me a guide?

Update Customer Address using CMD_EI_API

$
0
0

Hello Experts!

 

I need to update customer zip codes to ZIP+4. We are retrieving validated zip codes via a web service, but I am having trouble updating the customer addresses.

 

I have tried using BAPI_ADDRESSORG_CHANGE but it only updates ADRC and does not update the corresponding address fields in KNA1 until you manually save the changes in XD02. I would really rather not resort to using a BDC for XD02.

 

I have tried using SD_CUSTOMER_MAINTAIN_ALL but I was getting exception KNA1_INCOMPLETE indicating my KNA1 structure was not complete even though I had just loaded it using a SELECT statement prior to the call.

 

In some of my searches, I saw references to the CMD_EI_API class MAINTAIN, MAINTAIN_BAPI, and MAINTAIN_DIRECT_INPUT methods.

 

The associated IS_MASTER_DATA structure contains several data modification indicators:

The HEADER-OBJECT_TASK field appears to want: I)nsert, U)pdate, M)odify, or C)urrent Status.

The CENTRAL_DATA-ADDRESS-TASK field appears to want: I)nsert, U)pdate, D)elete, or M)odify.

The CENTRAL_DATA-ADDRESS-DATAX structure contains flags for each field to be updated.

 

With both TASK fields set to "U", the ES_MESSAGE_DEFECTIVE parameter returns “E019(CMD_API) Field: TASK, value: is not permitted”.

If I blank out the CENTRAL_DATA-ADDRESS-TASK field, I get “E019(CMD_API) Field: TASK, value: is not permitted”.

If I blank out the HEADER-OBJECT_TASK field, I get “E019(CMD_API) Field: OBJECT_TASK, value: is not permitted”.

If I blank out both, I still get “E019(CMD_API) Field: OBJECT_TASK, value: is not permitted”.

 

Any assistance you can provide would be greatly appreciated!

 

Here is a snapshot of my test code…

 

DATA:
lw_kunnr                  TYPE kunnr,

is_master_data            TYPE cmds_ei_main,
es_master_data            TYPE cmds_ei_main,
es_error                  TYPE cvis_message,
wa_customers              TYPE cmds_ei_extern,
lt_sales                  TYPE cmds_ei_sales_t,
wa_sales                  LIKE LINE OF lt_sales,
lw_master_data_correct    TYPE cmds_ei_main,
lw_message_correct        TYPE cvis_message,
lw_master_data_defective  TYPE cmds_ei_main,
lw_message_defective      TYPE cvis_message.

FIELD-SYMBOLS:
<lf_cst>                  TYPE cmds_ei_extern,
<lf_gen>                  TYPE cmds_ei_central_data.


  lw_kunnr = '0001000011'. "use an existing customer number in your system


* set up the control parameters
wa_customers-header-object_instance-kunnr = lw_kunnr.     "customer number
wa_customers-header-object_task = 'U'.                    "update customer
APPEND wa_customers TO is_master_data-customers.

* read the customer
cmd_ei_api_extract=>get_data( EXPORTING is_master_data = is_master_data
IMPORTING es_master_data = es_master_data ).

* read the customer information
READ TABLE es_master_data-customers ASSIGNING <lf_cst> INDEX 1.
CHECK sy-subrc EQ 0.

* set the modification control flags
<lf_cst>-header-object_task        = 'U'.                 "update customer
<lf_cst>-central_data-address-task = 'U'.                 "update address

* just for testing, add or remove the +4
IF STRLEN( <lf_cst>-central_data-address-postal-data-postl_cod1 ) EQ 5.
<lf_cst>-central_data-address-postal-data-postl_cod1 = '95678-1234'.
ELSE.
<lf_cst>-central_data-address-postal-data-postl_cod1 = '95678'.
ENDIF.


* set the corresponding field changed and update flags
<lf_cst>-central_data-address-postal-datax-postl_cod1 = 'X'.
<lf_cst>-central_data-address-postal-datax-updateflag = 'U'.

* update the customer
  CALL METHOD cmd_ei_api=>maintain_bapi
    EXPORTING
      is_master_data           = es_master_data
    IMPORTING
      es_master_data_correct   = lw_master_data_correct
      es_message_correct       = lw_message_correct
      es_master_data_defective = lw_master_data_defective
      es_message_defective     = lw_message_defective.


...


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

Once I can get the method to return a successful status in ES_MASTER_DATA_CORRECT or ES_MESSAGE_CORRECT, I will call the COMMIT to post the changes.

Call Function CLMA_DELETE_CLASS_WITH_OBJECTS

$
0
0

Hi Gurus,

 

I am no ABAP expert,

 

we are trying to call this FM CLMA_DELETE_CLASS_WITH_OBJECTS

 

but it throws dump with TSV_TNEW_BLOCKS_NO_ROLL_MEMORY

 

(trying to delete Class with object assignment)

 

please suggest

CDS views in HANA Live explorer?

$
0
0

Hi,

 

A question i am hoping that someone might be able to answer. There has been a move from native hana virtual data models (hana live content) to CDS views in S4. However the first edition of simple finance and long into 2.0 as well there was a use for native hana views. However this has been stated that these will be substituted by CDS views instead.

We have been using HANA Live Explorer on our projects so far, and quite like the features. However i haven't been able to expose a CDS view into the HANA live explorer yet even with the VDM annotations.

The reason why i am asking is that i see this as a great potential for "one source of truth" as we can then use the CDS views both for reporting, UI5 development and in ABAP.

I hope someone can help.


Testing Zebra printer configuration

$
0
0

Hi,

 

I have an issue with a Zebra printer script (it just print the Zebra code) and I would like to test the configuration of the printer before addressing it as a coding issue.

Is there any standard report in SAP to test Zebra printer sapscript?

 

Thank you

Ivan

Function Module to Create and Edit Company code.

$
0
0

Hi Folks

 

Need your help to get function module to Create and Edit company code  in EC01 and OX02 transaction.

Our Requirement is to automate a process to extend company codes  using reference company code.

As we are not able to find any function module decided to go for BDC, If is there  any other options  are present, Please suggest us.

 

 

Thanks & Regards

Kshirod.

BADi in transport request

$
0
0

Hi all,

 

Here's the requirement:

 

when deleting the transport request, the username will be checked first, if the name in not in a specific group, then the deleting comment will lead to a error message: you are no authorization to delete the TR.

 

Now, the question is whether there's a BADi which is triggered when 'DELETE' button is clicked.

 

Thanks in advance.

 

BR

George

CALL FUNCTION 'CLMO_CLASS_OBJECT_MAINTAIN'

$
0
0

Hi

 

I am not ABAP expert,

 

can someone give me example of CALL FUNCTION 'CLMO_CLASS_OBJECT_MAINTAIN'

 

I am trying to delete class ...

 

when call this FM it pops up window , wherein i need to enter shift f2 and confirm one more pop up

which I want to avoid...

 

Thanks and regards

BBP_PD_CTR_CREATE AND BBP_PD_CTR_SAVE NOT SAVING CTR

$
0
0

Hello all,

               I'm working in SRM 7.1 and having troubles to create a contract in status saved. I'm using the two BAPIS mentioned iat the title and BAPI TRANSACTION COMMIT but I'm just getting status 'in treatment'.

               I've been searching a lot through the web but i don´t find anything that could help me. Please any other opcion anyone knows about?? Thanks a lot. Below my code:

 

CALL FUNCTION 'BBP_PD_CTR_RESET_BUFFER'.

 

    CALL FUNCTION 'BBP_PD_CTR_CREATE'

     EXPORTING

*      I_REF_GUID              = gs_header-guid

*      I_BAPIMODE              = 'X'

*      I_PARK                  = 'X'

*      I_SAVE                  = 'X'

*      I_TESTRUN               =

       I_HEADER                = ls_header

*      I_SRC_GUID              =

*      I_SRC_OBJECT_TYPE       =

       IT_ATTACH               = gt_attach

       IT_CONDITIONS           = gt_conditions1

*      IV_NO_BADI_CALL         =

     IMPORTING

       E_HEADER                = gs_header_new

       ET_ATTACH               = gt_attach_new

       ET_CONDITIONS           = gt_conditions_new

      TABLES

       I_ITEM                  = gt_item1

       I_PARTNER               = gt_partner

       I_LONGTEXT              = gt_longtext

       I_ORGDATA               = gt_orgdata

       I_TOL                   = gt_tol

       I_HCF                   = gt_hcf

       I_ICF                   = gt_icf

       I_DIS                   = gt_dis

       E_ITEM                  = gt_item_new

       E_PARTNER               = gt_partner_new

       E_LONGTEXT              = gt_longtext_new

       E_ORGDATA               = gt_orgdata_new

       E_TOL                   = gt_tol_new

       E_HCF                   = gt_hcf_new

       E_ICF                   = gt_icf_new

       E_DIS                   = gt_dis_new

       E_STATUS                = gt_status_new

       E_MESSAGES              = gt_messages_new

       E_EXCHRATE              = gt_exchrate_new

       I_ACCOUNT               = gt_account

              .

 

*   CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'.

 

    IF gs_header_new IS NOT INITIAL.

 

      lv_cont = lv_cont + 1.

      lv_guid = gs_header_new-guid.

 

      CALL FUNCTION 'BBP_PD_CTR_SAVE'

       EXPORTING

*        IV_WORKITEM_ID               =

*        IV_USERTYPE                  =

         IV_HEADER_GUID               = lv_guid

*        IV_CREATE_HIST_VERSION       =

*        IV_KEEP_OLD_CHANGER          =

*        IV_NEW_CHANGED_BY            =

*        IV_RESET_CHANGES             =

                .

 

     IF sy-subrc EQ 0.

         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

         EXPORTING

         wait = 'X'.

     ENDIF.

.

Viewing all 8332 articles
Browse latest View live


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