Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

modifying E1EDK14

Former Member
0 Likes
1,838

Hi!

E1EDK14 is beeing populated with standart code:

CLEAR int_edidd.

CLEAR e1edk14.

int_edidd-segnam = 'E1EDK14'.

e1edk14-qualf = '006'.

PERFORM move_field USING 'E1EDK14-ORGID' vbdkr-spart ' '.

MOVE e1edk14 TO int_edidd-sdata.

APPEND int_edidd.

PERFORM customer_function.

But I need to modify E1EDK14-ORGID if E1EDK14-QUALF = '006'

How to do it?

Will reward,

Mindaugas.

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
1,437

Hi,

Please try this.


DATA: wa_e1edk14 LIKE e1edk14,
      l_idx      TYPE i.

LOOP AT int_edidd.
  CASE int_edidd-segnam.
    WHEN 'E1EDK14'.
      MOVE int_edidd-sdata to wa_e1edk14.
      CHECK wa_e1edk14-qualf = '006'.
      MOVE: <your new value> to wa_e1edk14-orgid,
            wa_e1edk14 TO int_edidd-sdata.
      DESCRIBE TABLE int_edidd LINES l_idx.
      MODIFY int_edidd INDEX l_idx.
  ENDCASE.    
ENDLOOP.

Regards,

Ferry Lianto

10 REPLIES 10
Read only

former_member582701
Contributor
0 Likes
1,437

Inside Customer_function, you need to write this code:

DATA: wa_e1edk14 LIKE E1EDK14.

IF int_edidd-segnam = 'E1EDK14'.

MOVE int_edidd-sdata TO wa_e1edk14.

IF wa_e1edk14-qualf = '006'.

wa_e1edk14-orgid = your new value!!!

MOVE wa_e1edk14 TO int_edidd-sdata.

MODIFY int_edidd-sdata.

ENDIF.

ENDIF.

Regards!!

Read only

0 Likes
1,437

thanks for fast answer, but now I get <b>"In Unicode programs, the character '-' cannot appear in names"</b> at MODIFY int_edidd-sdata.

and no possibility to uncheck Unicode checking in program atributes...

Any ideas?

M.

Read only

former_member582701
Contributor
0 Likes
1,437

I dont understand your problem.

Copy your code and the parameters that user eixt receives.

Other thing, u need to create a project and activate the user exits in CMOD transaction.

Read only

0 Likes
1,437

the code that you provided would be ok, but I get an error at bolded line, see below:

IF int_edidd-segnam = 'E1EDK14'.

MOVE int_edidd-sdata TO wa_e1edk14.

IF wa_e1edk14-qualf = '006'.

wa_e1edk14-orgid = your new value!!!

MOVE wa_e1edk14 TO int_edidd-sdata.

<b>MODIFY int_edidd-sdata.</b>

ENDIF.

Error sais:

In Unicode programs, the character '-' cannot appear in names"

As I understnad this error is realeted to Unicode checking. One way to solve this would be switching Unicode checking of, but I have no rights for this, so need some other solution...

Hope I described it better now.

M.

Read only

0 Likes
1,437

maybe it is easier to delete that line from segment and create it again instead of modifying? anyway, modifying would be better....

M.

Read only

0 Likes
1,437

You will not modify int_edidd-sdata, it should just be <b>int_edidd</b>

Read only

0 Likes
1,437

if I understand you correct, it should be:

IF int_edidd-segnam = 'E1EDK14'.

MOVE int_edidd-sdata TO wa_e1edk14.

IF wa_e1edk14-qualf = '006'.

wa_e1edk14-orgid = your new value!!!

MOVE wa_e1edk14 TO int_edidd-sdata.

<b>MODIFY int_edidd.</b>

ENDIF.

but this is causing a dump error......

M.

Read only

0 Likes
1,437

It is probably dumping because you are not in the loop there and did not specify index or where clause.

You should either specify the index (if you have it) or WHERE clause. See MODIFY internal table help.

Read only

0 Likes
1,437

Try with following code :

IF int_edidd-segnam = 'E1EDK14'.

MOVE int_edidd-sdata TO wa_e1edk14.

IF wa_e1edk14-qualf = '006'.

wa_e1edk14-orgid = your new value!!!

MOVE wa_e1edk14 TO int_edidd-sdata.

<b>APPEND</b> int_edidd.

ENDIF.

Thanks

Seshu

Read only

ferry_lianto
Active Contributor
0 Likes
1,438

Hi,

Please try this.


DATA: wa_e1edk14 LIKE e1edk14,
      l_idx      TYPE i.

LOOP AT int_edidd.
  CASE int_edidd-segnam.
    WHEN 'E1EDK14'.
      MOVE int_edidd-sdata to wa_e1edk14.
      CHECK wa_e1edk14-qualf = '006'.
      MOVE: <your new value> to wa_e1edk14-orgid,
            wa_e1edk14 TO int_edidd-sdata.
      DESCRIBE TABLE int_edidd LINES l_idx.
      MODIFY int_edidd INDEX l_idx.
  ENDCASE.    
ENDLOOP.

Regards,

Ferry Lianto